diff --git a/resources/changelog.txt b/resources/changelog.txt index aaa7397..f32bd90 100644 --- a/resources/changelog.txt +++ b/resources/changelog.txt @@ -351,4 +351,6 @@ v0.83: - Fix spam countdown resetting if you speak too early. v0.84: - Fix nation and town names not parsing out the _'s for spaces. - - Closes https://github.com/TownyAdvanced/Towny/issues/4489. \ No newline at end of file + - Closes https://github.com/TownyAdvanced/Towny/issues/4489. + - Allow hex colour codes to be used in the messagecolour options channels.yml. + - Closes https://github.com/TownyAdvanced/Towny/issues/4087. \ 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 b1cb59b..28c6e53 100644 --- a/src/com/palmergames/bukkit/TownyChat/channels/StandardChannel.java +++ b/src/com/palmergames/bukkit/TownyChat/channels/StandardChannel.java @@ -128,7 +128,7 @@ public class StandardChannel extends Channel { * Only modify GLOBAL channelType chat (general and local chat channels) if isModifyChat() is true. */ if (!(exec.equals(channelTypes.GLOBAL) && !ChatSettings.isModify_chat())) { - event.setFormat(Format.replace("{channelTag}", getChannelTag()).replace("{msgcolour}", getMessageColour())); + event.setFormat(Format.replace("{channelTag}", getChannelTag()).replace("{msgcolour}", TownyChatFormatter.hexIfCompatible(getMessageColour()))); LocalTownyChatEvent chatEvent = new LocalTownyChatEvent(event, resident); event.setFormat(TownyChatFormatter.getChatFormat(chatEvent)); }