Fix SkullMeta configuration serialization / deserialization with note block sound
This commit is contained in:
parent
c8feb06296
commit
7c6bf15d44
@ -98,10 +98,8 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
|||||||
|
|
||||||
if (noteBlockSound == null) {
|
if (noteBlockSound == null) {
|
||||||
Object object = map.get(NOTE_BLOCK_SOUND.BUKKIT);
|
Object object = map.get(NOTE_BLOCK_SOUND.BUKKIT);
|
||||||
if (object instanceof NamespacedKey) {
|
if (object != null) {
|
||||||
setNoteBlockSound((NamespacedKey) object);
|
setNoteBlockSound(NamespacedKey.fromString(object.toString()));
|
||||||
} else {
|
|
||||||
setNoteBlockSound(SerializableMeta.getObject(NamespacedKey.class, map, NOTE_BLOCK_SOUND.BUKKIT, true));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -305,7 +303,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
|||||||
}
|
}
|
||||||
NamespacedKey namespacedKeyNB = this.getNoteBlockSound();
|
NamespacedKey namespacedKeyNB = this.getNoteBlockSound();
|
||||||
if (namespacedKeyNB != null) {
|
if (namespacedKeyNB != null) {
|
||||||
return builder.put(NOTE_BLOCK_SOUND.BUKKIT, namespacedKeyNB);
|
return builder.put(NOTE_BLOCK_SOUND.BUKKIT, namespacedKeyNB.toString());
|
||||||
}
|
}
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user