Skip to content

Commit

Permalink
Merge branch 'main' of github.com:/Crazy-Crew/CrazyEnchantments
Browse files Browse the repository at this point in the history
  • Loading branch information
ryderbelserion committed Aug 15, 2024
2 parents 51feb19 + 8132ddc commit e8d0439
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,10 @@ private void blockDropItems(@NotNull Player player, @NotNull Block block, @NotNu
BlockDropItemEvent event = new BlockDropItemEvent(block, block.getState(), player, dropItems);
this.plugin.getServer().getPluginManager().callEvent(event);

// If cancelled, removes the blocks as they should have never been there.
// This mimics the method that the base server uses.
if (event.isCancelled()) dropItems.forEach(Entity::remove);

}

/**
Expand Down

0 comments on commit e8d0439

Please sign in to comment.