diff --git a/CraftBukkit-Patches/0072-Duplicate-Disconnect-Prevention.patch b/CraftBukkit-Patches/0072-Duplicate-Disconnect-Prevention.patch new file mode 100644 index 000000000..31c8f9c50 --- /dev/null +++ b/CraftBukkit-Patches/0072-Duplicate-Disconnect-Prevention.patch @@ -0,0 +1,42 @@ +From 61c2328ff2a651da8acb3c932e6b063e42071006 Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Thu, 5 Dec 2013 16:33:16 +1100 +Subject: [PATCH] Duplicate Disconnect Prevention + + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index 5534bc3..35c66c6 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 disconnected; // Spigot + + public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) { + this.minecraftServer = minecraftserver; +@@ -149,6 +150,12 @@ public class PlayerConnection implements PacketPlayInListener { + } + + public void disconnect(String s) { ++ // Spigot Start ++ if ( disconnected ) ++ { ++ return; ++ } ++ // Spigot End + // CraftBukkit start + String leaveMessage = EnumChatFormat.YELLOW + this.player.getName() + " left the game."; + +@@ -170,6 +177,7 @@ public class PlayerConnection implements PacketPlayInListener { + this.networkManager.handle(new PacketPlayOutKickDisconnect(chatcomponenttext), new GenericFutureListener[] { new PlayerConnectionFuture(this, chatcomponenttext)}); + this.a(chatcomponenttext); // CraftBukkit - Process quit immediately + this.networkManager.g(); ++ disconnected = true; // Spigot + } + + public void a(PacketPlayInSteerVehicle packetplayinsteervehicle) { +-- +1.8.3.2 +