aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorPetr Ilin <hevav@hevav.dev>2022-03-30 21:17:37 +0300
committerPetr Ilin <hevav@hevav.dev>2022-03-30 21:17:37 +0300
commit72ed13caabe733cb9ce7a97acc1255e13b5a6d3c (patch)
tree4bd0978452dc0e428bc76e8c31a739091949265a /src/main/java
parent2fa4a044911eb6ef61832d41b0c3dd07a16598b4 (diff)
downloadLimboAuth-72ed13caabe733cb9ce7a97acc1255e13b5a6d3c.tar.gz
LimboAuth-72ed13caabe733cb9ce7a97acc1255e13b5a6d3c.tar.bz2
LimboAuth-72ed13caabe733cb9ce7a97acc1255e13b5a6d3c.zip
Lowercased player caching
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/net/elytrium/limboauth/LimboAuth.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/net/elytrium/limboauth/LimboAuth.java b/src/main/java/net/elytrium/limboauth/LimboAuth.java
index f499df6..530076a 100644
--- a/src/main/java/net/elytrium/limboauth/LimboAuth.java
+++ b/src/main/java/net/elytrium/limboauth/LimboAuth.java
@@ -353,17 +353,17 @@ public class LimboAuth {
}
public void cacheAuthUser(Player player) {
- String username = player.getUsername();
+ String username = player.getUsername().toLowerCase(Locale.ROOT);
this.cachedAuthChecks.remove(username);
this.cachedAuthChecks.put(username, new CachedUser(player.getRemoteAddress().getAddress(), System.currentTimeMillis()));
}
public void removePlayerFromCache(String username) {
- this.cachedAuthChecks.remove(username);
+ this.cachedAuthChecks.remove(username.toLowerCase(Locale.ROOT));
}
public boolean needAuth(Player player) {
- String username = player.getUsername();
+ String username = player.getUsername().toLowerCase(Locale.ROOT);
if (!this.cachedAuthChecks.containsKey(username)) {
return true;
} else {