aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0193-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Spigot-Server-Patches/0193-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch')
-rw-r--r--Spigot-Server-Patches/0193-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0193-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch b/Spigot-Server-Patches/0193-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch
new file mode 100644
index 0000000000..966d95f596
--- /dev/null
+++ b/Spigot-Server-Patches/0193-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch
@@ -0,0 +1,28 @@
+From ce7f24eb9d636fa03187f7702aa92477144b4856 Mon Sep 17 00:00:00 2001
+From: Aikar <[email protected]>
+Date: Mon, 2 Jan 2017 02:07:24 -0500
+Subject: [PATCH] MC-111699: Ignore Improper Anvil Item Name Packets
+
+The client is improperly sending Item Name Packets to the server BEFORE
+the click event. This causes the server to reset before the click event is processed
+
+This breaks the ability to rename more than 1 item at a time.
+
+See: https://bugs.mojang.com/browse/MC-111699
+
+diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
+index 7c2d43ac2..cbe5d36d0 100644
+--- a/src/main/java/net/minecraft/server/PlayerConnection.java
++++ b/src/main/java/net/minecraft/server/PlayerConnection.java
+@@ -2449,7 +2449,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
+ String s4 = SharedConstants.a(packetplayincustompayload.b().e(32767));
+
+ if (s4.length() <= 30) {
+- containeranvil.a(s4);
++ if (!s4.isEmpty() || containeranvil.getSlot(2).getItem().isEmpty()) containeranvil.a(s4); // Paper - Hack Fix for MC-111699
+ }
+ } else {
+ containeranvil.a("");
+--
+2.12.2
+