mirror of
https://github.com/PaperMC/Paper.git
synced 2024-08-20 11:22:56 +02:00
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 Bukkit Changes: b999860d SPIGOT-2304: Add LootGenerateEvent CraftBukkit Changes:77fd87e4
SPIGOT-2304: Implement LootGenerateEventa1a705ee
SPIGOT-5566: Doused campfires & fires should call EntityChangeBlockEvent41712edd
SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item
29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
From f660591d8db199bc2b9cd40d90e7f1eafd3d6f7c 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 a6e95a9097..4fb27cc7ed 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
|
@@ -157,7 +157,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;
|
|
--
|
|
2.26.2
|
|
|