From 3fba354aa565d12eab8cda48d8a2c1a09e7efda9 Mon Sep 17 00:00:00 2001 From: Howaner Date: Sat, 3 Jan 2015 18:26:09 -0600 Subject: [PATCH] Fix kick messages --- .../0044-Fix-kick-messages.patch | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Spigot-Server-Patches/0044-Fix-kick-messages.patch diff --git a/Spigot-Server-Patches/0044-Fix-kick-messages.patch b/Spigot-Server-Patches/0044-Fix-kick-messages.patch new file mode 100644 index 0000000..f84ac18 --- /dev/null +++ b/Spigot-Server-Patches/0044-Fix-kick-messages.patch @@ -0,0 +1,41 @@ +From fe9819d75b488b738cac8ba273668e4746acbb64 Mon Sep 17 00:00:00 2001 +From: Howaner +Date: Sat, 3 Jan 2015 18:25:24 -0600 +Subject: [PATCH] Fix kick messages + + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index 8d97824..ef4d867 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -170,8 +170,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList + // CraftBukkit end + ChatComponentText chatcomponenttext = new ChatComponentText(s); + +- this.a(chatcomponenttext); // CraftBukkit - fire quit instantly + this.networkManager.a(new PacketPlayOutKickDisconnect(chatcomponenttext), new PlayerConnectionFuture(this, chatcomponenttext), new GenericFutureListener[0]); ++ this.a(chatcomponenttext); // CraftBukkit - fire quit instantly // PaperSpigot - Moved down + this.networkManager.k(); + this.minecraftServer.postToMainThread(new PlayerConnectionDisconnector(this)); // CraftBukkit - Don't wait + } +diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java +index cc2cc30..19657f0 100644 +--- a/src/main/java/net/minecraft/server/PlayerList.java ++++ b/src/main/java/net/minecraft/server/PlayerList.java +@@ -1147,9 +1147,11 @@ public abstract class PlayerList { + } + + public void v() { +- for (int i = 0; i < this.players.size(); ++i) { +- ((EntityPlayer) this.players.get(i)).playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message ++ // PaperSpigot start - for -> while ++ while (!this.players.isEmpty()) { ++ ((EntityPlayer) this.players.get(0)).playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message + } ++ // PaperSpigot end + } + + // CraftBukkit start +-- +1.9.5.msysgit.0 +