Skip to content

Commit

Permalink
Don't un-cancel inventory clicks that other plugins have cancelled
Browse files Browse the repository at this point in the history
  • Loading branch information
Konicai committed Jun 22, 2022
1 parent b478aff commit eb56a9e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ public void onInventoryClick(InventoryClickEvent event) {
menuCache.get(inventory).process(event.getSlot(), event.isRightClick(), new SpigotPlayer((Player) event.getWhoClicked()));
} else if (event.isShiftClick()) {
// stop players from shift-clicking items into the menu's inventory.
Inventory upper = event.getInventory();
event.setCancelled(menuCache.containsKey(upper));
if (menuCache.containsKey(event.getInventory())) { // the upper inventory
event.setCancelled(true);
}
}
}
}
Expand Down

0 comments on commit eb56a9e

Please sign in to comment.