Paper/Spigot-Server-Patches/0196-MC-111699-Ignore-Improper-Anvil-Item-Name-Packets.patch
Zach Brown 07d0098a9e
Update upstream B/CB/S
Adds /paper command for reloading the paper config.
Closes GH-639

Per-world config logging has been removed in favor of all or nothing
logging for all paper settings. I don't believe it was used enough to
warrant maintaining. If this is not the case it should be possible to
re-add it.
2017-03-24 22:27:43 -05:00

29 lines
1.4 KiB
Diff

From 1916b522325da7e8f0b8bd7ef187d273dbf3c3fe Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
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 964de593b..87683b20b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2434,7 +2434,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.0.windows.1