diff options
author | Kyle Wood <[email protected]> | 2021-04-24 17:01:33 -0500 |
---|---|---|
committer | Kyle Wood <[email protected]> | 2021-04-25 18:37:43 -0500 |
commit | 3093b81fee3064603c368ab934eddf66ce304433 (patch) | |
tree | cb99f05b5f31de92c41af4cc40b4bef5f3cbf573 /Spigot-Server-Patches-Unmapped/0056-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch | |
parent | 1af696a05d21cbdd7b5a7170f95598c013257588 (diff) | |
download | Paper-3093b81fee3064603c368ab934eddf66ce304433.tar.gz Paper-3093b81fee3064603c368ab934eddf66ce304433.zip |
Move patches
Diffstat (limited to 'Spigot-Server-Patches-Unmapped/0056-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch')
-rw-r--r-- | Spigot-Server-Patches-Unmapped/0056-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Spigot-Server-Patches-Unmapped/0056-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch b/Spigot-Server-Patches-Unmapped/0056-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch new file mode 100644 index 0000000000..e8a68b30bb --- /dev/null +++ b/Spigot-Server-Patches-Unmapped/0056-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: kashike <[email protected]> +Date: Tue, 8 Mar 2016 18:28:43 -0800 +Subject: [PATCH] Don't nest if we don't need to when cerealising text + components + + +diff --git a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutChat.java b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutChat.java +index edae451a54bfcd6b54e89c1619fb112a7763eb3b..f6a1c5ac9acb34b1ef2262721adbbb1a5b0feaf7 100644 +--- a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutChat.java ++++ b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutChat.java +@@ -40,7 +40,14 @@ public class PacketPlayOutChat implements Packet<PacketListenerPlayOut> { + // Paper end + // Spigot start + if (components != null) { +- packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(components)); ++ //packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(components)); // Paper - comment, replaced with below ++ // Paper start - don't nest if we don't need to so that we can preserve formatting ++ if (this.components.length == 1) { ++ packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(this.components[0])); ++ } else { ++ packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(this.components)); ++ } ++ // Paper end + } else { + packetdataserializer.a(this.a); + } |