Ivan did an oopsie 😬 (#164)

This commit is contained in:
Telesphoreo 2019-12-11 03:48:06 -08:00 committed by Ivan
parent bd84257c16
commit f758be9e70

View File

@ -54,14 +54,11 @@ public class ChatManager extends FreedomService
{
final Player player = event.getPlayer();
String message = event.getMessage().trim();
// Format colors
{
message = FUtil.colorize(message);
message = message.replaceAll(ChatColor.BOLD.toString(), "&l");
message = message.replaceAll(ChatColor.ITALIC.toString(), "&o");
message = message.replaceAll(ChatColor.UNDERLINE.toString(), "&n");
message = message.replaceAll(ChatColor.STRIKETHROUGH.toString(), "&m");
}
// Format colors and strip &k
message = FUtil.colorize(message);
message = message.replaceAll(ChatColor.MAGIC.toString(), "&k");
// Truncate messages that are too long - 256 characters is vanilla client max
if (message.length() > 256)
{
@ -201,4 +198,4 @@ public class ChatManager extends FreedomService
}
}
}
}
}