mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 12:12:08 -07:00
Fix BlockDestroyEvents effectBlock not being set (#10131)
This commit is contained in:
@@ -22,8 +22,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+import org.bukkit.block.data.BlockData;
|
||||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.block.BlockEvent;
|
||||
+import org.bukkit.event.block.BlockExpEvent;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+/**
|
||||
@@ -48,9 +48,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ private boolean cancelled = false;
|
||||
+
|
||||
+ public BlockDestroyEvent(@NotNull Block block, @NotNull BlockData newState, boolean willDrop) {
|
||||
+ super(block, 0);
|
||||
+ @ApiStatus.Internal
|
||||
+ public BlockDestroyEvent(@NotNull Block block, @NotNull BlockData newState, @NotNull BlockData effectBlock, int xp, boolean willDrop) {
|
||||
+ super(block, xp);
|
||||
+ this.newState = newState;
|
||||
+ this.effectBlock = effectBlock;
|
||||
+ this.willDrop = willDrop;
|
||||
+ }
|
||||
+
|
||||
|
Reference in New Issue
Block a user