diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index fb6a54b215..dd29094f20 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -163,7 +163,6 @@ public class PlayerConnection extends Connection { if (leaveMessage != null && leaveMessage.length() > 0) { this.minecraftServer.getPlayerList().sendAll(new Packet3Chat(leaveMessage)); } - getPlayer().disconnect(s); // CraftBukkit end this.minecraftServer.getPlayerList().disconnect(this.player); @@ -1068,9 +1067,6 @@ public class PlayerConnection extends Connection { } public void a(Packet255KickDisconnect packet255kickdisconnect) { - // CraftBukkit start - getPlayer().disconnect("disconnect.quitting"); - // CraftBukkit end this.networkManager.a("disconnect.quitting", new Object[0]); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java index 52dd997bd3..c43a6edd4b 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -204,6 +204,7 @@ public abstract class PlayerList { // CraftBukkit start - quitting must be before we do final save of data, in case plugins need to modify it PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(this.cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.name + " left the game."); this.cserver.getPluginManager().callEvent(playerQuitEvent); + entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); // CraftBukkit end this.b(entityplayer);