Remove redundant GameProfileCache diff

This commit is contained in:
Jason Penilla
2022-03-17 20:53:36 -07:00
parent 57a5d8880e
commit 535cd27411
4 changed files with 10 additions and 44 deletions

View File

@@ -607,7 +607,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+ // Paper start
+ @Nullable public GameProfile getProfileIfCached(String name) {
+ public @Nullable GameProfile getProfileIfCached(String name) {
+ GameProfileCache.GameProfileInfo entry = this.profilesByName.get(name.toLowerCase(Locale.ROOT));
+ if (entry == null) {
+ return null;
@@ -617,7 +617,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ // Paper end
+
public synchronized Optional<GameProfile> get(String name) { // Paper - synchronize
public Optional<GameProfile> get(String name) {
String s1 = name.toLowerCase(Locale.ROOT);
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java