Fix fallback chat format

TBMCPlugins/Chroma-Chat#121
This commit is contained in:
Norbi Peti 2020-07-28 02:36:26 +02:00
parent 8815877bea
commit ef96ec2604
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56

View file

@ -102,7 +102,7 @@ public class PlayerListener implements Listener {
.replace("{channel}", channel.DisplayName().get())
.replace("{origin}", event.getOrigin().substring(0, 1))
.replace("{name}", ChromaUtils.getDisplayName(event.getSender()))
.replace("{message}", "§" + channel.Color().get().ordinal() + event.getMessage());
.replace("{message}", String.format("§%x%s", channel.Color().get().ordinal(), event.getMessage()));
for (Player player : Bukkit.getOnlinePlayers())
if (event.shouldSendTo(player))
player.sendMessage(msg);