From bc943daf944c12c16223bc7dc23fce085620b38c Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 22 Dec 2018 11:01:20 +1100 Subject: [PATCH] Fix Jukebox API not synchronizing playing data with state --- .../java/org/bukkit/craftbukkit/block/CraftJukebox.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java index 50b0da15d0..3914234bdc 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java @@ -1,9 +1,7 @@ package org.bukkit.craftbukkit.block; import net.minecraft.server.BlockJukeBox; -import net.minecraft.server.BlockPosition; import net.minecraft.server.Blocks; -import net.minecraft.server.Item; import net.minecraft.server.ItemStack; import net.minecraft.server.TileEntity; import net.minecraft.server.TileEntityJukeBox; @@ -68,9 +66,9 @@ public class CraftJukebox extends CraftBlockEntityState imple ItemStack nms = CraftItemStack.asNMSCopy(record); this.getSnapshot().setRecord(nms); if (nms.isEmpty()) { - getHandle().set(BlockJukeBox.HAS_RECORD, false); + this.data = this.data.set(BlockJukeBox.HAS_RECORD, false); } else { - getHandle().set(BlockJukeBox.HAS_RECORD, true); + this.data = this.data.set(BlockJukeBox.HAS_RECORD, true); } }