Posts: 1,162
Threads: 68
Joined: Mar 2013
Thanks: 245
Given 125 thank(s) in 100 post(s)
04-07-2014, 04:18 AM
(This post was last modified: 04-07-2014, 04:58 AM by tonibm19.)
Yeah but if the reason is a connection time out? It's not the player's fault.
New version:
-Added bypass permission ("combatlog.bypass")
-You can now block commands on combat (BlockCommandsOnCombat, default true)
Posts: 302
Threads: 8
Joined: Feb 2014
Thanks: 48
Given 30 thank(s) in 26 post(s)
I did a bit of investigation on this topic.
I think CombatLog checks how a player disconnected like this:
1 - Is the player disconnected, because the host (the mc client) closed the connection without disconnect packet?
-> do nothing
2 - Is the player disconnecten, because he got kicked from the server?
-> do nothing
3 - Is the player disconnected, because he send a disconnect packet to the server?
-> do everything, thats enabled in the config (dropping inventory ect...)
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
Unfortunately as of 1.7+ the client doesn't send a disconnect packet anymore.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
That's client-bound - sent from the server to the client. We need the other direction, when the player chooses "Disconnect" in the menu; there's no packet sent for that, the client only drops the connection. I've checked this with ProtoProxy.
Posts: 1,469
Threads: 57
Joined: Jul 2012
Thanks: 66
Given 127 thank(s) in 108 post(s)
However, you do have to think: if a player's internet died, he would be dead anyway - it takes 30 seconds to timeout and the other player would have killed you by then.