From e5c86b8f4f5eb65e6d19ed0d5a4a7d4bf0415dc3 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Fri, 31 Jul 2020 16:20:29 +0100
Subject: [PATCH] Fix scoreboard vanilla colors not working in chat

---
 .../Option-to-use-vanilla-per-world-scoreboard-coloring-.patch  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch
index 1085d226c7..ac69b62521 100644
--- a/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch
+++ b/Spigot-Server-Patches/Option-to-use-vanilla-per-world-scoreboard-coloring-.patch
@@ -39,7 +39,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +                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());