make sure we check for canceled events

This commit is contained in:
hyperdefined
2026-04-05 20:22:30 -04:00
parent 6a13c7fef7
commit 7cd5e8f0d0
19 changed files with 23 additions and 42 deletions

View File

@@ -47,11 +47,8 @@ public class PickupItem implements Listener {
this.toolStats = toolStats;
}
@EventHandler(priority = EventPriority.HIGHEST)
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onPickup(EntityPickupItemEvent event) {
if (event.isCancelled()) {
return;
}
Entity entity = event.getEntity();
if (entity instanceof Player player) {
if (!toolStats.configTools.checkWorld(player.getWorld().getName())) {