From 58a6cb892bcb8c0fac7bfe9258733ad65dcefbb8 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Sun, 23 Mar 2014 10:54:53 +0000 Subject: [PATCH] Cap villagers' window name to prevent client disconnects --- ...ndow-name-to-prevent-client-disconne.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 CraftBukkit-Patches/0124-Cap-villagers-window-name-to-prevent-client-disconne.patch diff --git a/CraftBukkit-Patches/0124-Cap-villagers-window-name-to-prevent-client-disconne.patch b/CraftBukkit-Patches/0124-Cap-villagers-window-name-to-prevent-client-disconne.patch new file mode 100644 index 000000000..9a0ae5580 --- /dev/null +++ b/CraftBukkit-Patches/0124-Cap-villagers-window-name-to-prevent-client-disconne.patch @@ -0,0 +1,21 @@ +From ae90ccd76f7c287b5363d646f3c5e172ad47142a Mon Sep 17 00:00:00 2001 +From: Thinkofdeath +Date: Sun, 23 Mar 2014 10:53:48 +0000 +Subject: [PATCH] Cap villagers' window name to prevent client disconnects + + +diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java +index ace5d7b..b0a31b7 100644 +--- a/src/main/java/net/minecraft/server/EntityPlayer.java ++++ b/src/main/java/net/minecraft/server/EntityPlayer.java +@@ -750,6 +750,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + this.activeContainer.addSlotListener(this); + InventoryMerchant inventorymerchant = ((ContainerMerchant) this.activeContainer).getMerchantInventory(); + ++ if (s.length() > 32) s = s.substring( 0, 32 ); // Spigot - Cap window name to prevent client disconnects + this.playerConnection.sendPacket(new PacketPlayOutOpenWindow(this.containerCounter, 6, s == null ? "" : s, inventorymerchant.getSize(), s != null)); + MerchantRecipeList merchantrecipelist = imerchant.getOffers(this); + +-- +1.8.5.2.msysgit.0 +