From 226ae6ee30f7e798a3d9ca986071ecc38faec31d Mon Sep 17 00:00:00 2001 From: Llm Dl Date: Sun, 22 Aug 2021 15:04:14 -0500 Subject: [PATCH] - Allow channeltags to make use of hex colour formatting. --- pom.xml | 2 +- resources/changelog.txt | 4 +++- .../bukkit/TownyChat/channels/StandardChannel.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index a25ff03..34d8b5b 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ com.palmergames.bukkit TownyChat jar - 0.89 + 0.90 diff --git a/resources/changelog.txt b/resources/changelog.txt index 6fb6e3e..b5b613c 100644 --- a/resources/changelog.txt +++ b/resources/changelog.txt @@ -377,4 +377,6 @@ v0.88: - Fix hex color codes not being parsed in TownyChat spy messages. v0.89: - Update min. Towny to 0.97.0.0 and remove NotRegisteredException catches. - - Add support for EssentialsDiscord, courtesy of JRoy with PR #33. \ No newline at end of file + - Add support for EssentialsDiscord, courtesy of JRoy with PR #33. +v0.90: + - Allow channeltags to make use of hex colour formatting. \ 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 1bdc28e..06f32cd 100644 --- a/src/com/palmergames/bukkit/TownyChat/channels/StandardChannel.java +++ b/src/com/palmergames/bukkit/TownyChat/channels/StandardChannel.java @@ -124,7 +124,7 @@ public class StandardChannel extends Channel { * Only modify GLOBAL channelType chat (general and local chat channels) if isModifyChat() is true. */ if (!(channelType.equals(channelTypes.GLOBAL) && !ChatSettings.isModify_chat())) { - event.setFormat(format.replace("{channelTag}", getChannelTag()).replace("{msgcolour}", TownyChatFormatter.hexIfCompatible(getMessageColour()))); + event.setFormat(format.replace("{channelTag}", Colors.translateColorCodes(getChannelTag())).replace("{msgcolour}", Colors.translateColorCodes(getMessageColour()))); LocalTownyChatEvent chatEvent = new LocalTownyChatEvent(event, resident); event.setFormat(TownyChatFormatter.getChatFormat(chatEvent)); }