diff options
Diffstat (limited to 'src/main/java/net/elytrium/limboauth/LimboAuth.java')
-rw-r--r-- | src/main/java/net/elytrium/limboauth/LimboAuth.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/net/elytrium/limboauth/LimboAuth.java b/src/main/java/net/elytrium/limboauth/LimboAuth.java index bdde110..329fcb7 100644 --- a/src/main/java/net/elytrium/limboauth/LimboAuth.java +++ b/src/main/java/net/elytrium/limboauth/LimboAuth.java @@ -372,11 +372,12 @@ public class LimboAuth { } public boolean needAuth(Player player) { - String username = player.getUsername().toLowerCase(Locale.ROOT); - if (!this.cachedAuthChecks.containsKey(username)) { + String username = player.getUsername(); + String lowercaseUsername = username.toLowerCase(Locale.ROOT); + if (!this.cachedAuthChecks.containsKey(lowercaseUsername)) { return true; } else { - CachedSessionUser sessionUser = this.cachedAuthChecks.get(username); + CachedSessionUser sessionUser = this.cachedAuthChecks.get(lowercaseUsername); return !sessionUser.getInetAddress().equals(player.getRemoteAddress().getAddress()) || !sessionUser.getUsername().equals(username); } } |