Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dont strip explicit leading color codes in chat components (#1512)
- Loading branch information
1 parent
920bf46
commit 31a99db
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
Spigot-Server-Patches/0384-Dont-strip-explicit-leading-color-codes-in-chat-comp.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
From cc921fd1befdb375e09e13562d342b0e537616b5 Mon Sep 17 00:00:00 2001 | ||
From: BillyGalbreath <Blake.Galbreath@GMail.com> | ||
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 | ||
@@ -192,7 +192,7 @@ 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) { | ||
-- | ||
2.19.0 | ||
|