Add disable-general-commands to bukkit config

This commit is contained in:
Loki Rautio 2023-11-07 10:53:25 -06:00
parent 0a9eb447d6
commit 557476b5d6
2 changed files with 3 additions and 1 deletions

View File

@ -36,6 +36,7 @@ public class BukkitConfigurationManager extends YamlConfigurationManager {
@Unreported private ConcurrentMap<String, BukkitWorldConfiguration> worlds = new ConcurrentHashMap<>();
private boolean hasCommandBookGodMode;
boolean disableGeneralCommands;
boolean extraStats;
/**
@ -56,6 +57,7 @@ public class BukkitConfigurationManager extends YamlConfigurationManager {
public void load() {
super.load();
this.extraStats = getConfig().getBoolean("custom-metrics-charts", true);
this.disableGeneralCommands = getConfig().getBoolean("disable-general-commands", false);
}
@Override

View File

@ -160,7 +160,7 @@ public class WorldGuardPlugin extends JavaPlugin {
reg.register(ToggleCommands.class);
reg.register(ProtectionCommands.class);
if (!platform.getGlobalStateManager().hasCommandBookGodMode()) {
if (!platform.getGlobalStateManager().disableGeneralCommands && !platform.getGlobalStateManager().hasCommandBookGodMode()) {
reg.register(GeneralCommands.class);
}