Jukebox Fix

Fixed a bug where redstone would pop off the top of a jukebox after the record is done playing.
This commit is contained in:
Navoei
2023-05-17 20:12:21 -05:00
parent a70445f383
commit cdb7dca500
2 changed files with 4 additions and 6 deletions

View File

@@ -82,11 +82,9 @@ public class HopperManager implements Listener {
if (!event.isCancelled()) {
if (!Arrays.toString(hopper.getInventory().getContents()).contains("null")) return;
hopper.getInventory().setItem(hopper.getInventory().firstEmpty(), jukebox.getRecord());
block.setType(Material.AIR);
block.setType(Material.JUKEBOX);
jukebox.setRecord(new ItemStack(Material.AIR));
block.setBlockData(jukebox.getBlockData());
}
}