diff --git a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java index 05a3549..d081595 100644 --- a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java +++ b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java @@ -341,10 +341,12 @@ public final class RedisBungee extends Plugin { }, 0, 3, TimeUnit.SECONDS); consumer = new RedisBungeeConsumer(this); new Thread(consumer, "RedisBungee Consumer Thread").start(); - getProxy().getPluginManager().registerCommand(this, new RedisBungeeCommands.GlistCommand(this)); - getProxy().getPluginManager().registerCommand(this, new RedisBungeeCommands.FindCommand(this)); - getProxy().getPluginManager().registerCommand(this, new RedisBungeeCommands.LastSeenCommand(this)); - getProxy().getPluginManager().registerCommand(this, new RedisBungeeCommands.IpCommand(this)); + if (configuration.getBoolean("register-bungee-commands", true)) { + getProxy().getPluginManager().registerCommand(this, new RedisBungeeCommands.GlistCommand(this)); + getProxy().getPluginManager().registerCommand(this, new RedisBungeeCommands.FindCommand(this)); + getProxy().getPluginManager().registerCommand(this, new RedisBungeeCommands.LastSeenCommand(this)); + getProxy().getPluginManager().registerCommand(this, new RedisBungeeCommands.IpCommand(this)); + } getProxy().getPluginManager().registerCommand(this, new RedisBungeeCommands.SendToAll(this)); getProxy().getPluginManager().registerCommand(this, new RedisBungeeCommands.ServerId(this)); getProxy().getPluginManager().registerCommand(this, new RedisBungeeCommands.ServerIds()); diff --git a/src/main/resources/example_config.yml b/src/main/resources/example_config.yml index 71ba411..e3c4647 100644 --- a/src/main/resources/example_config.yml +++ b/src/main/resources/example_config.yml @@ -15,6 +15,17 @@ max-redis-connections: -1 # An identifier for this BungeeCord instance. server-id: iluvbungee +# Whether or not RedisBungee should install its version of regular BungeeCord commands. +# Often, the RedisBungee commands are desired, but in some cases someone may wish to +# override the commands using another plugin. +# +# If you are just denying access to the commands, RedisBungee uses the default BungeeCord +# permissions - just deny them and access will be denied. +# +# Please note that with build 787+, most commands overridden by RedisBungee were moved to +# modules, and these must be disabled or overridden yourself. +register-bungee-commands: true + # Whether or not /glist showall output should match vanilla BungeeCord. canonical-glist: true