diff --git a/src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java b/src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java index e4d102d49..5908b5d94 100644 --- a/src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java +++ b/src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java @@ -12,24 +12,24 @@ public class PlayerCache { } public void addPlayer(PlayerAuth auth) { - cache.put(auth.getNickname(), auth); + cache.put(auth.getNickname().toLowerCase(), auth); } public void updatePlayer(PlayerAuth auth) { - cache.remove(auth.getNickname()); - cache.put(auth.getNickname(), auth); + cache.remove(auth.getNickname().toLowerCase()); + cache.put(auth.getNickname().toLowerCase(), auth); } public void removePlayer(String user) { - cache.remove(user); + cache.remove(user.toLowerCase()); } public boolean isAuthenticated(String user) { - return cache.containsKey(user); + return cache.containsKey(user.toLowerCase()); } public PlayerAuth getAuth(String user) { - return cache.get(user); + return cache.get(user.toLowerCase()); } public static PlayerCache getInstance() {