diff --git a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeCommands.java b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeCommands.java index cf56640..4935f25 100644 --- a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeCommands.java +++ b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeCommands.java @@ -56,27 +56,22 @@ class RedisBungeeCommands { BaseComponent[] playersOnline = new ComponentBuilder("").color(ChatColor.YELLOW).append(String.valueOf(count)) .append(" player(s) are currently online.").create(); if (args.length > 0 && args[0].equals("showall")) { - if (RedisBungee.getConfiguration().isCanonicalGlist()) { - Multimap serverToPlayers = RedisBungee.getApi().getServerToPlayers(); - Multimap human = HashMultimap.create(); - for (Map.Entry entry : serverToPlayers.entries()) { - human.put(entry.getKey(), plugin.getUuidTranslator().getNameFromUuid(entry.getValue(), false)); - } - for (String server : new TreeSet<>(serverToPlayers.keySet())) { - TextComponent serverName = new TextComponent(); - serverName.setColor(ChatColor.GREEN); - serverName.setText("[" + server + "] "); - TextComponent serverCount = new TextComponent(); - serverCount.setColor(ChatColor.YELLOW); - serverCount.setText("(" + serverToPlayers.get(server).size() + "): "); - TextComponent serverPlayers = new TextComponent(); - serverPlayers.setColor(ChatColor.WHITE); - serverPlayers.setText(Joiner.on(", ").join(human.get(server))); - sender.sendMessage(serverName, serverCount, serverPlayers); - } - } else { - sender.sendMessage(new ComponentBuilder("Players: " + Joiner.on(", ").join(RedisBungee.getApi().getHumanPlayersOnline())) - .color(ChatColor.YELLOW).create()); + Multimap serverToPlayers = RedisBungee.getApi().getServerToPlayers(); + Multimap human = HashMultimap.create(); + for (Map.Entry entry : serverToPlayers.entries()) { + human.put(entry.getKey(), plugin.getUuidTranslator().getNameFromUuid(entry.getValue(), false)); + } + for (String server : new TreeSet<>(serverToPlayers.keySet())) { + TextComponent serverName = new TextComponent(); + serverName.setColor(ChatColor.GREEN); + serverName.setText("[" + server + "] "); + TextComponent serverCount = new TextComponent(); + serverCount.setColor(ChatColor.YELLOW); + serverCount.setText("(" + serverToPlayers.get(server).size() + "): "); + TextComponent serverPlayers = new TextComponent(); + serverPlayers.setColor(ChatColor.WHITE); + serverPlayers.setText(Joiner.on(", ").join(human.get(server))); + sender.sendMessage(serverName, serverCount, serverPlayers); } sender.sendMessage(playersOnline); } else { diff --git a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeConfiguration.java b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeConfiguration.java index 51a1cb2..51d7799 100644 --- a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeConfiguration.java +++ b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungeeConfiguration.java @@ -23,15 +23,12 @@ public class RedisBungeeConfiguration { @Getter private final boolean registerBungeeCommands; @Getter - private final boolean canonicalGlist; - @Getter private final List exemptAddresses; public RedisBungeeConfiguration(JedisPool pool, Configuration configuration) { this.pool = pool; this.serverId = configuration.getString("server-id"); this.registerBungeeCommands = configuration.getBoolean("register-bungee-commands", true); - this.canonicalGlist = configuration.getBoolean("canonical-glist", true); List stringified = configuration.getStringList("exempt-ip-addresses"); ImmutableList.Builder addressBuilder = ImmutableList.builder(); diff --git a/src/main/resources/example_config.yml b/src/main/resources/example_config.yml index 0e52b1e..4fa5f59 100644 --- a/src/main/resources/example_config.yml +++ b/src/main/resources/example_config.yml @@ -26,9 +26,6 @@ server-id: iluvbungee # 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 - # A list of IP addresses for which RedisBungee will not modify the response for, useful for automatic # restart scripts. exempt-ip-addresses: [] \ No newline at end of file