diff --git a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java index 560a837..bec2c58 100644 --- a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java +++ b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java @@ -175,11 +175,13 @@ public final class RedisBungee extends Plugin { keys.add("server:" + i + ":usersOnline"); } - Set users = rsc.sunion(keys.toArray(new String[keys.size()])); - if (users != null && !users.isEmpty()) { - for (String user : users) { - if (UUIDTranslator.UUID_PATTERN.matcher(user).find()) { - setBuilder = setBuilder.add(UUID.fromString(user)); + if (!keys.isEmpty()) { + Set users = rsc.sunion(keys.toArray(new String[keys.size()])); + if (users != null && !users.isEmpty()) { + for (String user : users) { + if (UUIDTranslator.UUID_PATTERN.matcher(user).find()) { + setBuilder = setBuilder.add(UUID.fromString(user)); + } } } }