Skip to content

Commit

Permalink
Always populate last known name into cache
Browse files Browse the repository at this point in the history
In theory this should never be an issue but
somehow is?
  • Loading branch information
JRoy authored and mdcfe committed Aug 5, 2023
1 parent 7f3b62a commit 02ced18
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,13 @@ public User loadUncachedUser(final UUID uuid) {
player = new OfflinePlayerStub(uuid, ess.getServer());
user = new User(player, ess);
((OfflinePlayerStub) player).setName(user.getLastAccountName());
uuidCache.updateCache(uuid, null);
uuidCache.updateCache(uuid, user.getLastAccountName());
return user;
}

return null;
}

public void addCachedUser(final User user) {
userCache.put(user.getUUID(), user);
debugLogCache(user);
}

@Override
public Map<String, UUID> getNameCache() {
return uuidCache.getNameCache();
Expand Down

0 comments on commit 02ced18

Please sign in to comment.