Skip to content

Commit

Permalink
Paper made changes smh
Browse files Browse the repository at this point in the history
  • Loading branch information
Dueris committed Jul 18, 2024
1 parent 3308431 commit 757bf01
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,14 @@ public void destroyBlocks() {
List<org.bukkit.block.Block> bukkitBlocks;

if (explode != null) {
EntityExplodeEvent event = new EntityExplodeEvent(explode, location, blockList, this.explosion.yield);
this.level.getCraftServer().getPluginManager().callEvent(event);
EntityExplodeEvent event = CraftEventFactory.callEntityExplodeEvent(this.explosion.source, blockList, this.explosion.yield, this.explosion.getBlockInteraction());
this.explosion.wasCanceled = event.isCancelled();
bukkitBlocks = event.blockList();
this.explosion.yield = event.getYield();
} else {
org.bukkit.block.Block block = location.getBlock();
org.bukkit.block.BlockState blockState = (level.damageSources().generic().getDirectBlockState() != null) ? level.damageSources().generic().getDirectBlockState() : block.getState();
BlockExplodeEvent event = new BlockExplodeEvent(block, blockState, blockList, this.explosion.yield);
this.level.getCraftServer().getPluginManager().callEvent(event);
org.bukkit.block.BlockState blockState = block.getState();
BlockExplodeEvent event = CraftEventFactory.callBlockExplodeEvent(block, blockState, blockList, this.explosion.yield, this.explosion.getBlockInteraction());
this.explosion.wasCanceled = event.isCancelled();
bukkitBlocks = event.blockList();
this.explosion.yield = event.getYield();
Expand Down

0 comments on commit 757bf01

Please sign in to comment.