1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 11:45:51 +00:00
Poslovitch 2017-09-10 11:05:54 +02:00
parent 55731ef532
commit eb17f19258

View File

@ -41,14 +41,17 @@ public class BlockListener implements Listener {
} }
} }
@SuppressWarnings("deprecation")
@EventHandler @EventHandler
public void onPistonRetract(BlockPistonRetractEvent e) { public void onPistonRetract(BlockPistonRetractEvent e) {
if (e.isSticky() && BlockStorage.hasBlockInfo(e.getRetractLocation().getBlock())) { if (e.isSticky()) {
for (Block b : e.getBlocks()) {
if (BlockStorage.hasBlockInfo(b)) {
e.setCancelled(true); e.setCancelled(true);
return; return;
} }
} }
}
}
@EventHandler @EventHandler
public void onRightClick(PlayerInteractEvent e) { public void onRightClick(PlayerInteractEvent e) {