diff options
author | md_5 <git@md-5.net> | 2018-01-01 12:15:43 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-01-01 12:32:48 +1100 |
commit | 595eaaa8be13eaf09967819bb60a69aba802fe51 (patch) | |
tree | 90dbe8ea7919295a616aefbec9bb4b684545433c | |
parent | 950006003c4f57ca4ac61280c93fdc5ba747ce20 (diff) | |
download | craftbukkit-595eaaa8be13eaf09967819bb60a69aba802fe51.tar craftbukkit-595eaaa8be13eaf09967819bb60a69aba802fe51.tar.gz craftbukkit-595eaaa8be13eaf09967819bb60a69aba802fe51.tar.lz craftbukkit-595eaaa8be13eaf09967819bb60a69aba802fe51.tar.xz craftbukkit-595eaaa8be13eaf09967819bb60a69aba802fe51.zip |
SPIGOT-3724: Make CraftMetaSkull work reliably for player skulls
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java index fbc16890..8c5d3eff 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java @@ -5,6 +5,7 @@ import java.util.Map; import net.minecraft.server.GameProfileSerializer; import net.minecraft.server.NBTBase; import net.minecraft.server.NBTTagCompound; +import net.minecraft.server.TileEntitySkull; import org.bukkit.Bukkit; import org.bukkit.Material; @@ -75,6 +76,9 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { super.applyToItem(tag); if (profile != null) { + // Fill in textures + profile = TileEntitySkull.b(profile); + NBTTagCompound owner = new NBTTagCompound(); GameProfileSerializer.serialize(owner, profile); tag.set(SKULL_OWNER.NBT, owner); |