- Allow hex colour codes to be used in the messagecolour options

channels.yml.
    - Closes https://github.com/TownyAdvanced/Towny/issues/4087.
This commit is contained in:
Llm Dl committed 2020-12-14 17:44:34 -06:00
1 parent e10ba6f427
commit 6923c06d0a
2 files changed
+4 -2

No files matched your search

+3 -1
View File
@@ -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.
- 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.
@@ -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));
}