mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 09:41:29 +01:00
SPIGOT-3724: Make CraftMetaSkull work reliably for player skulls
By: md_5 <git@md-5.net>
This commit is contained in:
parent
9a972c6f30
commit
39edf63dc2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user