Permalink
Browse files

Fix JukeBox NPE on 1.11 servers (#198)

  • Loading branch information...
BillyGalbreath authored and me4502 committed Dec 17, 2016
1 parent 2baebc1 commit e2ba190a35801a2dfec078296fff8f5389c1f84a
@@ -18,7 +18,7 @@ public void onRedstonePower(SourcedBlockRedstoneEvent event) {
Jukebox juke = (org.bukkit.block.Jukebox) event.getBlock().getState();
if(!event.isOn()) {
//FIXME byte data = juke.getRawData();
- //juke.setPlaying(null);
+ //juke.setPlaying(Material.AIR);
//event.getBlock().setTypeIdAndData(BlockID.JUKEBOX, data, false);
} else
juke.setPlaying(juke.getPlaying());
@@ -383,7 +383,7 @@ public void startPipe(Block block, List<ItemStack> items, boolean request) {
if (!ItemUtil.isStackValid(item)) continue;
block.getWorld().dropItem(BlockUtil.getBlockCentre(block), item);
}
- } else juke.setPlaying(null);
+ } else juke.setPlaying(Material.AIR);
}
} else {
PipeSuckEvent event = new PipeSuckEvent(block, new ArrayList<ItemStack>(items), fac);

0 comments on commit e2ba190

Please sign in to comment.