Fix state locking for getTopMRUProfiles & getProfileIfCached
Also add missing last access update in getProfileIfCached
This commit is contained in:
parent
e430a9b1bb
commit
57a5d8880e
2 changed files with 39 additions and 4 deletions
|
@ -609,7 +609,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper start
|
||||
+ @Nullable public GameProfile getProfileIfCached(String name) {
|
||||
+ GameProfileCache.GameProfileInfo entry = this.profilesByName.get(name.toLowerCase(Locale.ROOT));
|
||||
+ return entry == null ? null : entry.getProfile();
|
||||
+ if (entry == null) {
|
||||
+ return null;
|
||||
+ }
|
||||
+ entry.setLastAccess(this.getNextOperation());
|
||||
+ return entry.getProfile();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue