Simple Fix
This commit is contained in:
parent
0dc4558a45
commit
b8887c5d74
|
@ -27,14 +27,15 @@ public class InteractListeners implements Listener {
|
|||
@EventHandler(ignoreCancelled = true)
|
||||
public void onBlockInteract(PlayerInteractEvent e) {
|
||||
if (e.getClickedBlock() == null) return;
|
||||
|
||||
if (instance.getAnchorManager().getAnchor(e.getClickedBlock().getLocation()) == null) return;
|
||||
|
||||
if (e.getAction() != Action.RIGHT_CLICK_BLOCK) {
|
||||
instance.bust(e.getClickedBlock().getLocation());
|
||||
e.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (instance.getAnchorManager().getAnchor(e.getClickedBlock().getLocation()) == null) return;
|
||||
|
||||
if (!instance.canBuild(e.getPlayer(), e.getClickedBlock().getLocation())) {
|
||||
e.setCancelled(true);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue