13
0
geforkt von Mirrors/Paper

SPIGOT-3724: Make CraftMetaSkull work reliably for player skulls

Dieser Commit ist enthalten in:
md_5 2018-01-01 12:15:43 +11:00
Ursprung 950006003c
Commit 595eaaa8be

Datei anzeigen

@ -5,6 +5,7 @@ import java.util.Map;
import net.minecraft.server.GameProfileSerializer; import net.minecraft.server.GameProfileSerializer;
import net.minecraft.server.NBTBase; import net.minecraft.server.NBTBase;
import net.minecraft.server.NBTTagCompound; import net.minecraft.server.NBTTagCompound;
import net.minecraft.server.TileEntitySkull;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
@ -75,6 +76,9 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
super.applyToItem(tag); super.applyToItem(tag);
if (profile != null) { if (profile != null) {
// Fill in textures
profile = TileEntitySkull.b(profile);
NBTTagCompound owner = new NBTTagCompound(); NBTTagCompound owner = new NBTTagCompound();
GameProfileSerializer.serialize(owner, profile); GameProfileSerializer.serialize(owner, profile);
tag.set(SKULL_OWNER.NBT, owner); tag.set(SKULL_OWNER.NBT, owner);