mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 07:48:53 +01:00
Fix SkullMeta configuration serialization / deserialization with note block sound
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
parent
babc4636fa
commit
45bad8032d
1 changed files with 3 additions and 5 deletions
|
@ -98,10 +98,8 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
|||
|
||||
if (noteBlockSound == null) {
|
||||
Object object = map.get(NOTE_BLOCK_SOUND.BUKKIT);
|
||||
if (object instanceof NamespacedKey) {
|
||||
setNoteBlockSound((NamespacedKey) object);
|
||||
} else {
|
||||
setNoteBlockSound(SerializableMeta.getObject(NamespacedKey.class, map, NOTE_BLOCK_SOUND.BUKKIT, true));
|
||||
if (object != null) {
|
||||
setNoteBlockSound(NamespacedKey.fromString(object.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -305,7 +303,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
|||
}
|
||||
NamespacedKey namespacedKeyNB = this.getNoteBlockSound();
|
||||
if (namespacedKeyNB != null) {
|
||||
return builder.put(NOTE_BLOCK_SOUND.BUKKIT, namespacedKeyNB);
|
||||
return builder.put(NOTE_BLOCK_SOUND.BUKKIT, namespacedKeyNB.toString());
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue