diff --git a/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch b/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch index 0e482e811..726b1f17e 100644 --- a/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch +++ b/Spigot-Server-Patches/Use-UserCache-for-player-heads.patch @@ -8,13 +8,10 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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; - - import java.util.Map; - --import net.minecraft.server.GameProfileSerializer; --import net.minecraft.server.NBTBase; --import net.minecraft.server.NBTTagCompound; +@@ -0,0 +0,0 @@ import net.minecraft.server.GameProfileSerializer; + import net.minecraft.server.NBTBase; + import net.minecraft.server.NBTTagCompound; + import net.minecraft.server.TileEntitySkull; +import net.minecraft.server.*; import org.bukkit.Material; @@ -23,12 +20,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (name == null) { profile = null; } else { -- profile = new GameProfile(null, name); -+ // Paper start - Check usercache if the player is online ++ // Paper start - Use Online Players Skull + EntityPlayer player = MinecraftServer.getServer().getPlayerList().getPlayer(name); -+ profile = player != null ? player.getProfile() : new GameProfile(null, name); ++ if (profile == null && player != null) profile = player.getProfile(); + // Paper end + // Spigot start +- profile = TileEntitySkull.skinCache.getIfPresent(name.toLowerCase(java.util.Locale.ROOT)); ++ if (profile == null) profile = TileEntitySkull.skinCache.getIfPresent(name.toLowerCase(java.util.Locale.ROOT)); // Paper + if (profile == null) profile = new GameProfile(null, name); + // Spigot end } - - return true; -- \ No newline at end of file diff --git a/work/Spigot b/work/Spigot index 16c940b06..261f18109 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 16c940b0677cc9065df920e1113c80b5a047ca32 +Subproject commit 261f18109ea6338aa7a5dfe34fbb87e87945b8e5