From cd4848b2e64850da7da2570f225ee0dd6e9def0c Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Tue, 2 Oct 2018 09:21:12 -0500 Subject: [PATCH] Dont strip explicit leading color codes in chat components (#1512) --- ...cit-leading-color-codes-in-chat-comp.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Spigot-Server-Patches/Dont-strip-explicit-leading-color-codes-in-chat-comp.patch diff --git a/Spigot-Server-Patches/Dont-strip-explicit-leading-color-codes-in-chat-comp.patch b/Spigot-Server-Patches/Dont-strip-explicit-leading-color-codes-in-chat-comp.patch new file mode 100644 index 0000000000..7854599d96 --- /dev/null +++ b/Spigot-Server-Patches/Dont-strip-explicit-leading-color-codes-in-chat-comp.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Sun, 30 Sep 2018 08:40:14 -0500 +Subject: [PATCH] Dont strip explicit leading color codes in chat components + + +diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +index 5e20a9a61..df627d955 100644 +--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +@@ -0,0 +0,0 @@ public final class CraftChatMessage { + } + out.append(c.getText()); + } +- return out.toString().replaceFirst("^(" + defaultColor + ")*", ""); ++ return out.toString().replaceFirst("^(" + defaultColor + ")", ""); // Paper - GH-1484 + } + + public static IChatBaseComponent fixComponent(IChatBaseComponent component) { +-- \ No newline at end of file