mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
Treat LeavesDecayEvent as canceled if a plugin changes the block
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
parent
5a1e8c93bd
commit
f7acac0d40
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue