Use copies for PlayerProfile in PaperServerList and SkullMeta
Don't want to risk mutating players properties in server list (unlikely, but lets be proper) and Skull also has a setter API, so that should be used too.
This commit is contained in:
@@ -7,7 +7,7 @@ This allows you to create already filled textures on Skulls to avoid texture loo
|
||||
which commonly cause rate limit issues with Mojang API
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||
index e2ea49cd9..4855307b9 100644
|
||||
index e2ea49cd9..dbc083351 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||
@@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.inventory;
|
||||
@@ -41,7 +41,7 @@ index e2ea49cd9..4855307b9 100644
|
||||
+ @Nullable
|
||||
+ @Override
|
||||
+ public PlayerProfile getPlayerProfile() {
|
||||
+ return profile != null ? CraftPlayerProfile.asBukkitMirror(profile) : null;
|
||||
+ return profile != null ? CraftPlayerProfile.asBukkitCopy(profile) : null;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user