SPIGOT-7805: Fix jukebox deserialization

By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
CraftBukkit/Spigot 2024-07-01 07:08:06 +10:00
parent bc75f0bcb5
commit 292255a36a

View file

@ -35,7 +35,7 @@ public final class CraftJukeboxComponent implements JukeboxPlayableComponent {
public CraftJukeboxComponent(Map<String, Object> map) {
String song = SerializableMeta.getObject(String.class, map, "song", false);
Boolean showTooltip = SerializableMeta.getObject(boolean.class, map, "show-in-tooltip", true);
Boolean showTooltip = SerializableMeta.getObject(Boolean.class, map, "show-in-tooltip", true);
this.handle = new JukeboxPlayable(new EitherHolder<>(ResourceKey.create(Registries.JUKEBOX_SONG, MinecraftKey.parse(song))), (showTooltip != null) ? showTooltip : true);
}