mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2025-12-28 19:19: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:
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user