LowerCase expected

This commit is contained in:
Xephi 2015-04-27 12:52:06 +02:00
parent 26f63ba908
commit a80792d947

View File

@ -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() {