Skip to content

Commit

Permalink
Revert excludedCommands regex
Browse files Browse the repository at this point in the history
This reverts commit 3dd2575.

Revert "修改正则表达式,同时新增默认排除 /teammsg 和 /tm"

This reverts commit 144f854.
  • Loading branch information
Xujiayao committed Oct 28, 2024
1 parent ea68e6a commit 4cdb51f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/xujiayao/discord_mc_chat/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static class Generic {

public boolean shutdownImmediately = false;

public List<String> excludedCommands = List.of("\\/msg ([^@].*)", "\\/tell ([^@].*)", "\\/tellraw ([^@].*)", "\\/w ([^@].*)", "\\/teammsg (.*)", "\\/tm (.*)");
public List<String> excludedCommands = List.of("/msg", "/tell", "/tellraw", "/w");

public List<String> adminsIds = new ArrayList<>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 4cdb51f

Please sign in to comment.