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 3774466388..0dc527c44e 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 @@ -27,25 +27,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } - s = String.format(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage()); -- minecraftServer.console.sendMessage(s); -+ // Paper start - (Meh) Support for vanilla world scoreboard name coloring -+ //s = String.format(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage()); -+ IChatBaseComponent baseComponent = new ChatMessage(String.format(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage())); ++ // Paper Start - (Meh) Support for vanilla world scoreboard name coloring ++ String displayName = event.getPlayer().getDisplayName(); + if (this.player.getWorld().paperConfig.useVanillaScoreboardColoring) { -+ baseComponent = new ChatMessage(event.getFormat(), ScoreboardTeam.getPlayerDisplayName(this.player.aO(), player.getDisplayName()), event.getMessage()); ++ displayName = ScoreboardTeam.getPlayerDisplayName(this.player.aO(), player.getDisplayName()); + } ++ ++ s = String.format(event.getFormat(), displayName, event.getMessage()); + // Paper end -+ minecraftServer.console.sendMessage(baseComponent.toPlainText()); + minecraftServer.console.sendMessage(s); if (((LazyPlayerSet) event.getRecipients()).isLazy()) { for (Object recipient : minecraftServer.getPlayerList().players) { -- ((EntityPlayer) recipient).sendMessage(CraftChatMessage.fromString(s)); -+ ((EntityPlayer) recipient).sendMessage(baseComponent); // Paper - (Meh) Support for vanilla world scoreboard name coloring - } - } else { - for (Player recipient : event.getRecipients()) { -- recipient.sendMessage(s); -+ ((CraftPlayer) recipient).getHandle().sendMessage(baseComponent); // Paper - (Meh) Support for vanilla world scoreboard name coloring - } - } - } -- \ No newline at end of file