From ecd55ecaab80c8b23051b057c8dab5dc23d8869e Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 22 Dec 2018 11:01:20 +1100 Subject: [PATCH] Fix Jukebox API not synchronizing playing data with state By: md_5 --- .../java/org/bukkit/craftbukkit/block/CraftJukebox.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java index 50b0da15d0..3914234bdc 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java +++ b/paper-server/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); } }