2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-12-23 18:48:02 +00:00

Remove the player-list-in-ping feature.

This feature is something that would ideally be separate from RedisBungee. With the removal of this feature, this is something I will be creating and unveiling when 0.3.2 is released.
This commit is contained in:
Tux 2014-06-05 00:19:25 -04:00
parent 484d0bc46b
commit 16ca96562f
2 changed files with 2 additions and 16 deletions

View File

@ -63,18 +63,7 @@ public class RedisBungeeListener implements Listener {
public void onPing(ProxyPingEvent event) {
ServerPing old = event.getResponse();
ServerPing reply = new ServerPing();
if (RedisBungee.getConfiguration().getBoolean("player-list-in-ping", false)) {
Set<UUID> players = plugin.getPlayers();
ServerPing.PlayerInfo[] info = new ServerPing.PlayerInfo[players.size()];
int idx = 0;
for (UUID player : players) {
info[idx] = new ServerPing.PlayerInfo(plugin.getUuidTranslator().getNameFromUuid(player, false), "");
idx++;
}
reply.setPlayers(new ServerPing.Players(old.getPlayers().getMax(), players.size(), info));
} else {
reply.setPlayers(new ServerPing.Players(old.getPlayers().getMax(), plugin.getCount(), null));
}
reply.setPlayers(new ServerPing.Players(old.getPlayers().getMax(), plugin.getCount(), null));
reply.setDescription(old.getDescription());
reply.setFavicon(old.getFaviconObject());
reply.setVersion(old.getVersion());

View File

@ -27,7 +27,4 @@ server-id: iluvbungee
register-bungee-commands: true
# Whether or not /glist showall output should match vanilla BungeeCord.
canonical-glist: true
# Output all players in the server list. Recommended only for smaller networks.
player-list-in-ping: false
canonical-glist: true