diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-11-29 22:31:55 +0000 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-11-29 22:31:55 +0000 |
commit | 0f552845d08e4bb22edb771ac0dbfbede76758af (patch) | |
tree | 8e4e2625c7fa1e481bd53d345eafd456393661ea | |
parent | 9255e9d82c04d590ab2ab019f87cf0dce45a3c54 (diff) | |
download | craftbukkit-0f552845d08e4bb22edb771ac0dbfbede76758af.tar craftbukkit-0f552845d08e4bb22edb771ac0dbfbede76758af.tar.gz craftbukkit-0f552845d08e4bb22edb771ac0dbfbede76758af.tar.lz craftbukkit-0f552845d08e4bb22edb771ac0dbfbede76758af.tar.xz craftbukkit-0f552845d08e4bb22edb771ac0dbfbede76758af.zip |
Treat LeavesDecayEvent as canceled if a plugin changes the block
-rw-r--r-- | nms-patches/BlockLeaves.patch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nms-patches/BlockLeaves.patch b/nms-patches/BlockLeaves.patch index 78afcf0b..be0e66aa 100644 --- a/nms-patches/BlockLeaves.patch +++ b/nms-patches/BlockLeaves.patch @@ -1,5 +1,5 @@ ---- ../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 +--- ../work/decompile-8eb82bde//net/minecraft/server/BlockLeaves.java 2014-11-29 22:31:45.788917956 +0000 ++++ src/main/java/net/minecraft/server/BlockLeaves.java 2014-11-29 22:27:58.604922998 +0000 @@ -2,6 +2,8 @@ import java.util.Random; @@ -17,7 +17,7 @@ + LeavesDecayEvent event = new LeavesDecayEvent(world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ())); + world.getServer().getPluginManager().callEvent(event); + -+ if (event.isCancelled()) { ++ if (event.isCancelled() || world.getType(blockposition).getBlock() != this) { + return; + } + // CraftBukkit end |