This commit is contained in:
rockyhawk64 2022-07-07 15:32:16 +10:00
parent 17168ef241
commit 39b3e5917a

View File

@ -20,9 +20,9 @@ public class PanelBlockOnClick implements Listener {
@EventHandler @EventHandler
public void onInteract(PlayerInteractEvent e){ public void onInteract(PlayerInteractEvent e){
if (e.getAction() == Action.RIGHT_CLICK_BLOCK && e.getClickedBlock() != null) {
boolean isPanelBlock = blockClickEventTrigger(e.getClickedBlock().getLocation(), e.getPlayer(), true); boolean isPanelBlock = blockClickEventTrigger(e.getClickedBlock().getLocation(), e.getPlayer(), true);
if (isPanelBlock) { if (isPanelBlock) {
if (e.getAction() == Action.RIGHT_CLICK_BLOCK && e.getClickedBlock() != null) {
blockClickEventTrigger(e.getClickedBlock().getLocation(), e.getPlayer(), false); blockClickEventTrigger(e.getClickedBlock().getLocation(), e.getPlayer(), false);
e.setCancelled(true); e.setCancelled(true);
} }