Better interact handling

This commit is contained in:
Brianna O'Keefe 2018-09-13 15:38:36 -04:00
parent 3b5ccc4690
commit 0dc4558a45
1 changed files with 2 additions and 1 deletions

View File

@ -24,8 +24,9 @@ public class InteractListeners implements Listener {
}
@EventHandler
@EventHandler(ignoreCancelled = true)
public void onBlockInteract(PlayerInteractEvent e) {
if (e.getClickedBlock() == null) return;
if (e.getAction() != Action.RIGHT_CLICK_BLOCK) {
instance.bust(e.getClickedBlock().getLocation());
e.setCancelled(true);