Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/ By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
26
paper-server/nms-patches/BlockLeaves.patch
Normal file
26
paper-server/nms-patches/BlockLeaves.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
--- ../work/decompile-bb26c12b/net/minecraft/server/BlockLeaves.java 2014-11-27 08:59:46.537422569 +1100
|
||||
+++ src/main/java/net/minecraft/server/BlockLeaves.java 2014-11-27 08:42:10.132850949 +1100
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user