diff options
author | feildmaster <admin@feildmaster.com> | 2013-12-06 13:17:04 -0600 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2013-12-06 21:34:06 -0600 |
commit | 97cb46f9f8fcfed8ae47e89f80c598ba4423c8d7 (patch) | |
tree | c331800d18850a6f9a9fa013046146cd6280737e /src/main | |
parent | 70747ca28b716101b9069a1b04b898d24229ac4d (diff) | |
download | craftbukkit-97cb46f9f8fcfed8ae47e89f80c598ba4423c8d7.tar craftbukkit-97cb46f9f8fcfed8ae47e89f80c598ba4423c8d7.tar.gz craftbukkit-97cb46f9f8fcfed8ae47e89f80c598ba4423c8d7.tar.lz craftbukkit-97cb46f9f8fcfed8ae47e89f80c598ba4423c8d7.tar.xz craftbukkit-97cb46f9f8fcfed8ae47e89f80c598ba4423c8d7.zip |
Reintroduce disconnection flag that was removed in 1.7 update.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/net/minecraft/server/PlayerConnection.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index 54c8881a..da1a7e70 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -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. |