Check Profile Cache for PlayerProfile API
This ensures we look up the name for ID only Profiles If the profile is in the UserCache, we can get those details quickly This should avoid some unnecessary round trips. Additionally, handle profiles for offline mode to use offline UUID's
This commit is contained in:
@@ -19,7 +19,7 @@ index 4b82e43a8..35fde8b23 100644
|
||||
private final ItemCooldown bW;
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 21631c588..87e31cf0d 100644
|
||||
index 21631c588..9c894185b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -82,7 +82,7 @@ index 21631c588..87e31cf0d 100644
|
||||
+ }
|
||||
+ }
|
||||
+ public PlayerProfile getPlayerProfile() {
|
||||
+ return CraftPlayerProfile.asBukkitCopy(getHandle().getProfile());
|
||||
+ return new CraftPlayerProfile(this);
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user