make it not kill other clients' chat commands

This commit is contained in:
Daniella / Tove 2024-05-23 12:06:04 +02:00 committed by GitHub
parent 98c4bf2a97
commit 6f1368f6fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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));