diff --git a/src/main/java/vc/util/PlayerLookup.java b/src/main/java/vc/util/PlayerLookup.java index cafdc3e..d666680 100644 --- a/src/main/java/vc/util/PlayerLookup.java +++ b/src/main/java/vc/util/PlayerLookup.java @@ -35,12 +35,12 @@ public PlayerLookup(final ProfileApi mojangApi, final UuidApi mineToolsApi) { public record PlayerIdentity(UUID uuid, String playerName) { } public Optional getPlayerIdentity(final String playerName) { - final PlayerIdentity identityFromCache = uuidCache.getIfPresent(playerName); + final PlayerIdentity identityFromCache = uuidCache.getIfPresent(playerName.toLowerCase().trim()); if (identityFromCache != null) return Optional.of(identityFromCache); Optional playerIdentity = lookupIdentityMojang(playerName).or(() -> lookupIdentityMinetools(playerName)); - playerIdentity.ifPresent(identity -> uuidCache.put(playerName, identity)); + playerIdentity.ifPresent(identity -> uuidCache.put(playerName.toLowerCase().trim(), identity)); return playerIdentity; }