From 757bf0106e707a9b7ba8a917256562178b080b53 Mon Sep 17 00:00:00 2001 From: dueris Date: Thu, 18 Jul 2024 15:23:19 -0700 Subject: [PATCH] Paper made changes smh --- .../originspaper/factory/data/types/ExplosionMask.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/origins/src/main/java/me/dueris/originspaper/factory/data/types/ExplosionMask.java b/origins/src/main/java/me/dueris/originspaper/factory/data/types/ExplosionMask.java index 51d6570ec..9d4a3a07f 100644 --- a/origins/src/main/java/me/dueris/originspaper/factory/data/types/ExplosionMask.java +++ b/origins/src/main/java/me/dueris/originspaper/factory/data/types/ExplosionMask.java @@ -145,16 +145,14 @@ public void destroyBlocks() { List 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();