9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-28 02:59:13 +00:00

Option to blacklist all commands (#138)

* Option to blacklist all commands

* blacklist all commands by default

---------

Co-authored-by: William <will27528@gmail.com>
This commit is contained in:
kFor
2023-06-22 13:25:17 +03:00
committed by GitHub
parent bbcb091daf
commit c306d700ce
2 changed files with 2 additions and 2 deletions

View File

@@ -178,7 +178,7 @@ public class BukkitEventListener extends EventListener implements BukkitJoinEven
String[] commandArgs = event.getMessage().substring(1).split(" ");
String commandLabel = commandArgs[0].toLowerCase(Locale.ENGLISH);
if (blacklistedCommands.contains(commandLabel)) {
if (blacklistedCommands.contains("*") || blacklistedCommands.contains(commandLabel)) {
event.setCancelled(cancelPlayerEvent(event.getPlayer().getUniqueId()));
}
}