mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 23:46:57 +01:00
#1012: Always save as skull owner and not as internal data
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
parent
8b46bfaaa2
commit
80e9699ccf
1 changed files with 1 additions and 9 deletions
|
@ -5,7 +5,6 @@ import com.mojang.authlib.GameProfile;
|
|||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import net.minecraft.nbt.GameProfileSerializer;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.level.block.entity.TileEntitySkull;
|
||||
import org.bukkit.Bukkit;
|
||||
|
@ -79,13 +78,6 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
void serializeInternal(final Map<String, NBTBase> internalTags) {
|
||||
if (profile != null) {
|
||||
internalTags.put(SKULL_PROFILE.NBT, serializedProfile);
|
||||
}
|
||||
}
|
||||
|
||||
private void setProfile(GameProfile profile) {
|
||||
this.profile = profile;
|
||||
this.serializedProfile = (profile == null) ? null : GameProfileSerializer.writeGameProfile(new NBTTagCompound(), profile);
|
||||
|
@ -244,7 +236,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
|||
@Override
|
||||
Builder<String, Object> serialize(Builder<String, Object> builder) {
|
||||
super.serialize(builder);
|
||||
if (hasOwner()) {
|
||||
if (this.profile != null) {
|
||||
return builder.put(SKULL_OWNER.BUKKIT, new CraftPlayerProfile(this.profile));
|
||||
}
|
||||
return builder;
|
||||
|
|
Loading…
Reference in a new issue