Add disable-general-commands to bukkit config
This commit is contained in:
parent
0a9eb447d6
commit
557476b5d6
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue