forked from SteamWar/SteamWar
Fix PistonCalculator
This commit is contained in:
+2
-1
@@ -55,7 +55,8 @@ public class PistonCalculator implements Listener {
|
||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
if (!Permission.BUILD.hasPermission(event.getPlayer())) return;
|
||||
if (event.getAction() != Action.RIGHT_CLICK_BLOCK) return;
|
||||
if (event.hasItem() && event.getItem().getType() != Material.SLIME_BALL) return;
|
||||
if (event.hasItem() && event.getItem().getType() == Material.SLIME_BALL) {
|
||||
} else if (event.hasItem()) return;
|
||||
if (event.getClickedBlock() == null) return;
|
||||
Block clickedBlock = event.getClickedBlock();
|
||||
Material blockType = clickedBlock.getType();
|
||||
|
||||
Reference in New Issue
Block a user