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

View File

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