mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-23 17:37:45 +01:00
654b792caf
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes:a339310c
#755: Fix NPE when calling getInventory() for virtual EnderChests2577f9bf
Increase outdated build delay1dabfdc8
#754: Fix pre-1.16 serialized SkullMeta being broken on 1.16+, losing textures
26 lines
1.3 KiB
Diff
26 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Techcable <Techcable@outlook.com>
|
|
Date: Wed, 2 Mar 2016 23:42:37 -0600
|
|
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 e950b1957133fef20c464284807df262a7684238..c57634317b661e05ddd085d04f7338045445069f 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
|
@@ -165,7 +165,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
|
if (name == null) {
|
|
setProfile(null);
|
|
} else {
|
|
- setProfile(new GameProfile(null, name));
|
|
+ // Paper start - Use Online Players Skull
|
|
+ GameProfile newProfile = null;
|
|
+ net.minecraft.server.EntityPlayer player = net.minecraft.server.MinecraftServer.getServer().getPlayerList().getPlayer(name);
|
|
+ if (player != null) newProfile = player.getProfile();
|
|
+ if (newProfile == null) newProfile = new GameProfile(null, name);
|
|
+ setProfile(newProfile);
|
|
+ // Paper end
|
|
}
|
|
|
|
return true;
|