mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
90ac03522a
This reverts commit d6e3dff7d8
.
26 lines
1,018 B
Diff
26 lines
1,018 B
Diff
--- ../work/decompile-8eb82bde//net/minecraft/server/BlockLeaves.java 2014-11-28 17:43:42.913707439 +0000
|
|
+++ src/main/java/net/minecraft/server/BlockLeaves.java 2014-11-28 17:38:22.000000000 +0000
|
|
@@ -2,6 +2,8 @@
|
|
|
|
import java.util.Random;
|
|
|
|
+import org.bukkit.event.block.LeavesDecayEvent; // CraftBukkit
|
|
+
|
|
public abstract class BlockLeaves extends BlockTransparent {
|
|
|
|
public static final BlockStateBoolean DECAYABLE = BlockStateBoolean.of("decayable");
|
|
@@ -128,6 +130,14 @@
|
|
}
|
|
|
|
private void d(World world, BlockPosition blockposition) {
|
|
+ // CraftBukkit start
|
|
+ LeavesDecayEvent event = new LeavesDecayEvent(world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
|
+ world.getServer().getPluginManager().callEvent(event);
|
|
+
|
|
+ if (event.isCancelled()) {
|
|
+ return;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
this.b(world, blockposition, world.getType(blockposition), 0);
|
|
world.setAir(blockposition);
|
|
}
|