From e13b990d6d4c23ba4a5be3f055f4b4ad426bbccf Mon Sep 17 00:00:00 2001 From: Tux Date: Fri, 25 Dec 2015 06:21:25 -0500 Subject: [PATCH] getPlayersOnServer() check should be case-insensitive. --- .../minecraft/redisbungee/RedisBungee.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java index ac2b4e7..d293623 100644 --- a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java +++ b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java @@ -181,7 +181,15 @@ public final class RedisBungee extends Plugin { final Set getPlayersOnServer(@NonNull String server) { checkArgument(getProxy().getServers().containsKey(server), "server does not exist"); - return ImmutableSet.copyOf(serversToPlayers().get(server)); + Multimap serversToPlayers = serversToPlayers(); + + for (String s : serversToPlayers.keySet()) { + if (s.equalsIgnoreCase(server)) { + return ImmutableSet.copyOf(serversToPlayers.get(s)); + } + } + + return Collections.emptySet(); } final void sendProxyCommand(@NonNull String proxyId, @NonNull String command) {