forked from Upstream/CommandPanels
3.18.1.1
This commit is contained in:
parent
17168ef241
commit
39b3e5917a
@ -20,10 +20,10 @@ public class PanelBlockOnClick implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onInteract(PlayerInteractEvent e){
|
public void onInteract(PlayerInteractEvent e){
|
||||||
boolean isPanelBlock = blockClickEventTrigger(e.getClickedBlock().getLocation(), e.getPlayer(),true);
|
if (e.getAction() == Action.RIGHT_CLICK_BLOCK && e.getClickedBlock() != null) {
|
||||||
if(isPanelBlock) {
|
boolean isPanelBlock = blockClickEventTrigger(e.getClickedBlock().getLocation(), e.getPlayer(), true);
|
||||||
if (e.getAction() == Action.RIGHT_CLICK_BLOCK && e.getClickedBlock() != null) {
|
if (isPanelBlock) {
|
||||||
blockClickEventTrigger(e.getClickedBlock().getLocation(), e.getPlayer(),false);
|
blockClickEventTrigger(e.getClickedBlock().getLocation(), e.getPlayer(), false);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user