diff --git a/src/main/java/com/xujiayao/discord_mc_chat/Config.java b/src/main/java/com/xujiayao/discord_mc_chat/Config.java index 871ebce..e5a831f 100644 --- a/src/main/java/com/xujiayao/discord_mc_chat/Config.java +++ b/src/main/java/com/xujiayao/discord_mc_chat/Config.java @@ -66,7 +66,7 @@ public static class Generic { public boolean shutdownImmediately = false; - public List excludedCommands = List.of("\\/msg ([^@].*)", "\\/tell ([^@].*)", "\\/tellraw ([^@].*)", "\\/w ([^@].*)", "\\/teammsg (.*)", "\\/tm (.*)"); + public List excludedCommands = List.of("/msg", "/tell", "/tellraw", "/w"); public List adminsIds = new ArrayList<>(); } diff --git a/src/main/java/com/xujiayao/discord_mc_chat/minecraft/MinecraftEventListener.java b/src/main/java/com/xujiayao/discord_mc_chat/minecraft/MinecraftEventListener.java index ea35067..ad6a283 100644 --- a/src/main/java/com/xujiayao/discord_mc_chat/minecraft/MinecraftEventListener.java +++ b/src/main/java/com/xujiayao/discord_mc_chat/minecraft/MinecraftEventListener.java @@ -186,7 +186,7 @@ public static void init() { MinecraftEvents.PLAYER_COMMAND.register((player, command) -> { if (CONFIG.generic.broadcastPlayerCommandExecution) { for (String excludedCommand : CONFIG.generic.excludedCommands) { - if (command.matches(excludedCommand)) { + if (command.startsWith(excludedCommand + " ")) { return; } }