mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-10 09:02:09 -07:00
Allow plugins to replace texture if already set on skulls
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Use UserCache for player heads
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||
index 8a58615f..987cc9a8 100644
|
||||
index b6b34627a..5659c1c70 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 @@ import net.minecraft.server.GameProfileSerializer;
|
||||
@@ -22,9 +22,11 @@ index 8a58615f..987cc9a8 100644
|
||||
} else {
|
||||
- profile = new GameProfile(null, name);
|
||||
+ // Paper start - Use Online Players Skull
|
||||
+ GameProfile newProfile = null;
|
||||
+ EntityPlayer player = MinecraftServer.getServer().getPlayerList().getPlayer(name);
|
||||
+ if (profile == null && player != null) profile = player.getProfile();
|
||||
+ if (profile == null) profile = new GameProfile(null, name);
|
||||
+ if (player != null) newProfile = player.getProfile();
|
||||
+ if (newProfile == null) profile = new GameProfile(null, name);
|
||||
+ profile = newProfile;
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user