Reintroduce disconnection flag that was removed in 1.7 update.

This commit is contained in:
feildmaster 2013-12-06 13:17:04 -06:00
parent 70747ca28b
commit 97cb46f9f8

View file

@ -77,6 +77,7 @@ public class PlayerConnection implements PacketPlayInListener {
private double z;
private double q;
public boolean checkMovement = true; // CraftBukkit - private -> public
private boolean processedDisconnect; // CraftBukkit - added
public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) {
this.minecraftServer = minecraftserver;
@ -678,7 +679,13 @@ public class PlayerConnection implements PacketPlayInListener {
}
public void a(IChatBaseComponent ichatbasecomponent) {
if (this.isDisconnected()) return; // CraftBukkit - Don't trigger twice on kicks
// CraftBukkit start - Rarely it would send a disconnect line twice
if (this.processedDisconnect) {
return;
} else {
this.processedDisconnect = true;
}
// CraftBukkit end
c.info(this.player.getName() + " lost connection: " + ichatbasecomponent.c()); // CraftBukkit - Don't toString the component
this.minecraftServer.au();
// CraftBukkit start - Replace vanilla quit message handling with our own.