Skip to content

Commit

Permalink
Merge pull request #5 from the-h-team/master
Browse files Browse the repository at this point in the history
Test with ignoreCancelled = true
  • Loading branch information
Hempfest authored May 15, 2021
2 parents 0ca2b5f + 8fa5ff7 commit 0aa2e53
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,20 +166,20 @@ public void onPlayerDeath(PlayerDeathEvent event) {
}
}

@EventHandler(priority = EventPriority.HIGHEST)
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onBucketRelease(PlayerBucketEmptyEvent event) {
ClaimInteractEvent e = new ClaimInteractEvent(event.getPlayer(), event.getBlock().getLocation());
Bukkit.getPluginManager().callEvent(e);
e.handleCheck();
event.setCancelled(e.isCancelled());
if (e.isCancelled()) event.setCancelled(true);
}

@EventHandler(priority = EventPriority.HIGHEST)
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onBucketFill(PlayerBucketFillEvent event) {
ClaimInteractEvent e = new ClaimInteractEvent(event.getPlayer(), event.getBlock().getLocation());
Bukkit.getPluginManager().callEvent(e);
e.handleCheck();
event.setCancelled(e.isCancelled());
if (e.isCancelled()) event.setCancelled(true);
}

@EventHandler(priority = EventPriority.NORMAL)
Expand Down

0 comments on commit 0aa2e53

Please sign in to comment.