mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-24 01:27:35 +01:00
LowerCase expected
This commit is contained in:
parent
26f63ba908
commit
a80792d947
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user