mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-22 20:28:00 +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:
parent
10466a9464
commit
e82a3ac5dd
@ -56,7 +56,6 @@ 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<String, UUID> serverToPlayers = RedisBungee.getApi().getServerToPlayers();
|
||||
Multimap<String, String> human = HashMultimap.create();
|
||||
for (Map.Entry<String, UUID> entry : serverToPlayers.entries()) {
|
||||
@ -74,10 +73,6 @@ class RedisBungeeCommands {
|
||||
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());
|
||||
}
|
||||
sender.sendMessage(playersOnline);
|
||||
} else {
|
||||
sender.sendMessage(playersOnline);
|
||||
|
@ -23,15 +23,12 @@ public class RedisBungeeConfiguration {
|
||||
@Getter
|
||||
private final boolean registerBungeeCommands;
|
||||
@Getter
|
||||
private final boolean canonicalGlist;
|
||||
@Getter
|
||||
private final List<InetAddress> 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<String> stringified = configuration.getStringList("exempt-ip-addresses");
|
||||
ImmutableList.Builder<InetAddress> addressBuilder = ImmutableList.builder();
|
||||
|
@ -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: []
|
Loading…
Reference in New Issue
Block a user