Skip to content

Commit

Permalink
Merge pull request #231 from BentoBoxWorld/230_AdvancedEnchantments_c…
Browse files Browse the repository at this point in the history
…ompatibility

Ignore BlockBreakEvent if the block is an AE block
  • Loading branch information
tastybento authored Dec 8, 2024
2 parents 6c623c9 + 75f6e8c commit b9a3cfc
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ public void onBlock(BlockPlaceEvent e) {

@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onBlock(BlockBreakEvent e) {
if (e.getBlock().hasMetadata("blockbreakevent-ignore")) {
// Ignore event due to Advanced Enchantments. See https://ae.advancedplugins.net/for-developers/plugin-compatiblity-issues
// @since 1.28.0
return;
}
handleBreak(e, e.getBlock());
}

Expand Down

0 comments on commit b9a3cfc

Please sign in to comment.