2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-26 22:18:01 +00:00

Remove the canonical glist setting as server owners should override /glist with a plugin if they don't like RedisBungee's version.

This commit is contained in:
Tux 2015-04-18 10:14:49 -04:00
parent 10466a9464
commit e82a3ac5dd
3 changed files with 16 additions and 27 deletions

View File

@ -56,7 +56,6 @@ class RedisBungeeCommands {
BaseComponent[] playersOnline = new ComponentBuilder("").color(ChatColor.YELLOW).append(String.valueOf(count)) BaseComponent[] playersOnline = new ComponentBuilder("").color(ChatColor.YELLOW).append(String.valueOf(count))
.append(" player(s) are currently online.").create(); .append(" player(s) are currently online.").create();
if (args.length > 0 && args[0].equals("showall")) { if (args.length > 0 && args[0].equals("showall")) {
if (RedisBungee.getConfiguration().isCanonicalGlist()) {
Multimap<String, UUID> serverToPlayers = RedisBungee.getApi().getServerToPlayers(); Multimap<String, UUID> serverToPlayers = RedisBungee.getApi().getServerToPlayers();
Multimap<String, String> human = HashMultimap.create(); Multimap<String, String> human = HashMultimap.create();
for (Map.Entry<String, UUID> entry : serverToPlayers.entries()) { for (Map.Entry<String, UUID> entry : serverToPlayers.entries()) {
@ -74,10 +73,6 @@ class RedisBungeeCommands {
serverPlayers.setText(Joiner.on(", ").join(human.get(server))); serverPlayers.setText(Joiner.on(", ").join(human.get(server)));
sender.sendMessage(serverName, serverCount, serverPlayers); sender.sendMessage(serverName, serverCount, serverPlayers);
} }
} else {
sender.sendMessage(new ComponentBuilder("Players: " + Joiner.on(", ").join(RedisBungee.getApi().getHumanPlayersOnline()))
.color(ChatColor.YELLOW).create());
}
sender.sendMessage(playersOnline); sender.sendMessage(playersOnline);
} else { } else {
sender.sendMessage(playersOnline); sender.sendMessage(playersOnline);

View File

@ -23,15 +23,12 @@ public class RedisBungeeConfiguration {
@Getter @Getter
private final boolean registerBungeeCommands; private final boolean registerBungeeCommands;
@Getter @Getter
private final boolean canonicalGlist;
@Getter
private final List<InetAddress> exemptAddresses; private final List<InetAddress> exemptAddresses;
public RedisBungeeConfiguration(JedisPool pool, Configuration configuration) { public RedisBungeeConfiguration(JedisPool pool, Configuration configuration) {
this.pool = pool; this.pool = pool;
this.serverId = configuration.getString("server-id"); this.serverId = configuration.getString("server-id");
this.registerBungeeCommands = configuration.getBoolean("register-bungee-commands", true); this.registerBungeeCommands = configuration.getBoolean("register-bungee-commands", true);
this.canonicalGlist = configuration.getBoolean("canonical-glist", true);
List<String> stringified = configuration.getStringList("exempt-ip-addresses"); List<String> stringified = configuration.getStringList("exempt-ip-addresses");
ImmutableList.Builder<InetAddress> addressBuilder = ImmutableList.builder(); ImmutableList.Builder<InetAddress> addressBuilder = ImmutableList.builder();

View File

@ -26,9 +26,6 @@ server-id: iluvbungee
# modules, and these must be disabled or overridden yourself. # modules, and these must be disabled or overridden yourself.
register-bungee-commands: true register-bungee-commands: true
# Whether or not /glist showall output should match vanilla BungeeCord.
canonical-glist: true
# A list of IP addresses for which RedisBungee will not modify the response for, useful for automatic # A list of IP addresses for which RedisBungee will not modify the response for, useful for automatic
# restart scripts. # restart scripts.
exempt-ip-addresses: [] exempt-ip-addresses: []