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

Fix error when no other servers were present

This commit is contained in:
Tux 2014-04-26 20:09:53 -04:00
parent 0a2b43e7dc
commit e316e84c2b

View File

@ -175,11 +175,13 @@ public final class RedisBungee extends Plugin {
keys.add("server:" + i + ":usersOnline"); keys.add("server:" + i + ":usersOnline");
} }
Set<String> users = rsc.sunion(keys.toArray(new String[keys.size()])); if (!keys.isEmpty()) {
if (users != null && !users.isEmpty()) { Set<String> users = rsc.sunion(keys.toArray(new String[keys.size()]));
for (String user : users) { if (users != null && !users.isEmpty()) {
if (UUIDTranslator.UUID_PATTERN.matcher(user).find()) { for (String user : users) {
setBuilder = setBuilder.add(UUID.fromString(user)); if (UUIDTranslator.UUID_PATTERN.matcher(user).find()) {
setBuilder = setBuilder.add(UUID.fromString(user));
}
} }
} }
} }