mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 10:05:59 +00:00
Ivan did an oopsie 😬 (#164)
This commit is contained in:
parent
bd84257c16
commit
f758be9e70
@ -54,14 +54,11 @@ public class ChatManager extends FreedomService
|
|||||||
{
|
{
|
||||||
final Player player = event.getPlayer();
|
final Player player = event.getPlayer();
|
||||||
String message = event.getMessage().trim();
|
String message = event.getMessage().trim();
|
||||||
// Format colors
|
|
||||||
{
|
// Format colors and strip &k
|
||||||
message = FUtil.colorize(message);
|
message = FUtil.colorize(message);
|
||||||
message = message.replaceAll(ChatColor.BOLD.toString(), "&l");
|
message = message.replaceAll(ChatColor.MAGIC.toString(), "&k");
|
||||||
message = message.replaceAll(ChatColor.ITALIC.toString(), "&o");
|
|
||||||
message = message.replaceAll(ChatColor.UNDERLINE.toString(), "&n");
|
|
||||||
message = message.replaceAll(ChatColor.STRIKETHROUGH.toString(), "&m");
|
|
||||||
}
|
|
||||||
// Truncate messages that are too long - 256 characters is vanilla client max
|
// Truncate messages that are too long - 256 characters is vanilla client max
|
||||||
if (message.length() > 256)
|
if (message.length() > 256)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user