mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2026-04-22 19:11:23 +00:00
make sure we check for canceled events
This commit is contained in:
@@ -42,12 +42,8 @@ public class InventoryOpen implements Listener {
|
||||
this.toolStats = toolStats;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onOpen(InventoryOpenEvent event) {
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Inventory inventory = event.getInventory();
|
||||
InventoryHolder holder = inventory.getHolder();
|
||||
boolean isBlockInventory = holder instanceof BlockInventoryHolder || holder instanceof DoubleChest;
|
||||
|
||||
Reference in New Issue
Block a user