Compare commits

..

1 commit

Author SHA1 Message Date
Tud
6f1368f6fc
make it not kill other clients' chat commands 2024-05-23 12:06:04 +02:00

View file

@ -201,7 +201,7 @@ public class EventHandler {
profilerChat.next("idle");
}
// Don't add chatcolor to commands!
else if (!event.getOriginalMessage().startsWith("/") && !event.getOriginalMessage().startsWith(".") && !event.getOriginalMessage().startsWith("#")) {
else if ((ChatColor.getInstance().enabled || ChatSuffix.getInstance().enabled) && !event.getOriginalMessage().startsWith("/") && !event.getOriginalMessage().startsWith(".") && !event.getOriginalMessage().startsWith("#") && !event.getOriginalMessage().startsWith("&")) {
profilerChat.next("command");
event.setCanceled(true);
TTCp.player.sendChatMessage(ChatColor.getInstance().get() + event.getMessage() + ChatSuffix.getInstance().get(ChatSuffix.getInstance().chance));