Allow default RedisBungee commands to not be registered

This commit is contained in:
Tux 2014-06-04 12:59:21 -04:00
parent 527f76ac6b
commit 14c2f95a94
2 changed files with 17 additions and 4 deletions

View File

@ -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());

View File

@ -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