Skip to content

Commit

Permalink
- Fix hex color codes not being parsed in TownyChat spy messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
LlmDl committed May 2, 2021
1 parent 893dce6 commit cb2f8da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
- Fix spam_time settings not working.
- Fix hex color codes not being parsed in TownyChat spy messages.
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ private String formatSpyMessage(channelTypes type, Player player) {
// 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();
Expand Down

0 comments on commit cb2f8da

Please sign in to comment.