Skip to content

Commit

Permalink
inventory script gui: HIGH not MONITOR for cancelling
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Nov 14, 2021
1 parent ebacf12 commit 40c4dbc
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -57,7 +57,7 @@ public void onPlayerLogin(PlayerLoginEvent event) {
public static HashSet<ClickType> allowedClicks = new HashSet<>(Arrays.asList(ClickType.CONTROL_DROP, ClickType.CREATIVE, ClickType.DROP, ClickType.LEFT,
ClickType.MIDDLE, ClickType.NUMBER_KEY, ClickType.RIGHT, ClickType.WINDOW_BORDER_LEFT, ClickType.WINDOW_BORDER_RIGHT));

@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPlayerClicks(InventoryClickEvent event) {
InventoryTag inventory = InventoryTag.mirrorBukkitInventory(event.getInventory());
if (event.getRawSlot() >= event.getInventory().getSize() || event.getRawSlot() < 0) {
Expand All @@ -75,7 +75,7 @@ public void onPlayerClicks(InventoryClickEvent event) {
}
}

@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPlayerDrags(InventoryDragEvent event) {
InventoryTag inventory = InventoryTag.mirrorBukkitInventory(event.getInventory());
if (inventory.getIdHolder() instanceof ScriptTag) {
Expand Down

0 comments on commit 40c4dbc

Please sign in to comment.