From cb2f8da9c3218ae7ff991bcf3b6a791949748e76 Mon Sep 17 00:00:00 2001 From: Llm Dl Date: Sun, 2 May 2021 12:01:11 -0500 Subject: [PATCH] - Fix hex color codes not being parsed in TownyChat spy messages. --- resources/changelog.txt | 3 ++- .../palmergames/bukkit/TownyChat/channels/StandardChannel.java | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/changelog.txt b/resources/changelog.txt index b64f3ac..c56d6e1 100644 --- a/resources/changelog.txt +++ b/resources/changelog.txt @@ -373,4 +373,5 @@ v0.87: - Fix UnsupportedOperationException which was possible when leaving a channel. v0.88: - Fix players who've just recently joined a town/nation/alliance not being included in the town/nation/alliance chats. - - Fix spam_time settings not working. \ No newline at end of file + - Fix spam_time settings not working. + - Fix hex color codes not being parsed in TownyChat spy messages. \ No newline at end of file diff --git a/src/com/palmergames/bukkit/TownyChat/channels/StandardChannel.java b/src/com/palmergames/bukkit/TownyChat/channels/StandardChannel.java index 811ad8d..52ecdf2 100644 --- a/src/com/palmergames/bukkit/TownyChat/channels/StandardChannel.java +++ b/src/com/palmergames/bukkit/TownyChat/channels/StandardChannel.java @@ -354,6 +354,9 @@ public class StandardChannel extends Channel { // Not in a town/nation (doesn't matter which) } String format = ChatColor.translateAlternateColorCodes('&', getChannelTag()); + if (Towny.is116Plus()) + format = HexFormatter.translateHexColors(format); + switch (type) { case TOWN: format = format + " [" + town.getName() + "] " + resident.getName();