diff options
author | William Blake Galbreath <[email protected]> | 2020-07-31 16:20:29 +0100 |
---|---|---|
committer | Shane Freeder <[email protected]> | 2020-07-31 16:20:29 +0100 |
commit | 58a745eba0beeec4f080256330261c505b8e1a66 (patch) | |
tree | 1c8829ad0415656f9996506dbc5d722430b555cc | |
parent | 3cf2c52d9559d450acd19af42e5ba539f16b3851 (diff) | |
download | Paper-58a745eba0beeec4f080256330261c505b8e1a66.tar.gz Paper-58a745eba0beeec4f080256330261c505b8e1a66.zip |
Fix scoreboard vanilla colors not working in chat
-rw-r--r-- | Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index c515eb5bcf..1589e6774c 100644 --- a/Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -26,7 +26,7 @@ index fe2c8001897dc6d66ce0d24ddb1a5d3b79810294..538e6751f3bda77ba32256158d2a6a25 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index e65aa13ed4d751c7eec576b75496683d8b95d06f..c865aab4f56d6b0544ef66a35ebf58e48c8afbb8 100644 +index 530b5d4be48adae8d7d31e886b62b543de7d97ad..b6d1637607b5bd2339e2ddebaad89898ecc83c78 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1693,7 +1693,16 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -39,7 +39,7 @@ index e65aa13ed4d751c7eec576b75496683d8b95d06f..c865aab4f56d6b0544ef66a35ebf58e4 + if (this.player.getWorld().paperConfig.useVanillaScoreboardColoring) { + IChatBaseComponent nameFromTeam = ScoreboardTeam.a(this.player.getScoreboardTeam(), ((CraftPlayer) player).getHandle().getDisplayName()); + // Explicitly add a RESET here, vanilla uses components for this now... -+ displayName = CraftChatMessage.fromComponent(nameFromTeam) + org.bukkit.ChatColor.RESET; ++ displayName = new net.md_5.bungee.api.chat.TextComponent(net.md_5.bungee.chat.ComponentSerializer.parse(IChatBaseComponent.ChatSerializer.componentToJson(nameFromTeam))).toLegacyText() + org.bukkit.ChatColor.RESET; + } + + s = String.format(event.getFormat(), displayName, event.getMessage()); |