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

Fixes to SLP.

This commit is contained in:
Tux 2013-10-28 23:10:14 -04:00
parent 23944f7313
commit bb97d35076

View File

@ -322,11 +322,11 @@ public class RedisBungee extends Plugin implements Listener {
List<ServerPing.PlayerInfo> players = new ArrayList<>(); List<ServerPing.PlayerInfo> players = new ArrayList<>();
for (String player : getPlayers()) { for (String player : getPlayers()) {
// TODO: Find a better way of doing the UUIDs - right now I'm simply flunking it rather badly. // TODO: Find a better way of doing the UUIDs - right now I'm simply flunking it rather badly.
players.add(new ServerPing.PlayerInfo(player, new UUID(player.hashCode() + System.currentTimeMillis(), player.hashCode() + System.nanoTime()).toString())); players.add(new ServerPing.PlayerInfo(player, "aaaa"));
} }
ServerPing reply = new ServerPing(); ServerPing reply = new ServerPing();
reply.setPlayers(new ServerPing.Players(players.size(), old.getPlayers().getMax())); reply.setPlayers(new ServerPing.Players(old.getPlayers().getMax(), players.size()));
reply.setSample((ServerPing.PlayerInfo[]) players.toArray()); reply.setSample(players.toArray(new ServerPing.PlayerInfo[players.size()]));
reply.setDescription(old.getDescription()); reply.setDescription(old.getDescription());
reply.setFavicon(old.getFavicon()); reply.setFavicon(old.getFavicon());
reply.setVersion(old.getVersion()); reply.setVersion(old.getVersion());