Add BlockFace to BlockDamageEvent

This commit is contained in:
aerulion
2023-08-21 04:36:07 +02:00
parent 1abc111403
commit edb4225d90
2 changed files with 3 additions and 3 deletions

View File

@@ -197,7 +197,7 @@
+ }
+ return;
+ }
+ org.bukkit.event.block.BlockDamageEvent blockEvent = CraftEventFactory.callBlockDamageEvent(this.player, pos, this.player.getInventory().getSelected(), f >= 1.0f);
+ org.bukkit.event.block.BlockDamageEvent blockEvent = CraftEventFactory.callBlockDamageEvent(this.player, pos, direction, this.player.getInventory().getSelected(), f >= 1.0f); // Paper - Add BlockFace to BlockDamageEvent
+
+ if (blockEvent.isCancelled()) {
+ // Let the client know the block still exists