summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockPlant.patch
blob: c9ac5dc76e1cf3f7e80143b68e78cb0d7e9b70ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- a/net/minecraft/server/BlockPlant.java
+++ b/net/minecraft/server/BlockPlant.java
@@ -40,6 +40,11 @@
 
     protected void e(World world, BlockPosition blockposition, IBlockData iblockdata) {
         if (!this.f(world, blockposition, iblockdata)) {
+            // CraftBukkit start
+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, blockposition).isCancelled()) {
+                return;
+            }
+            // CraftBukkit end
             this.b(world, blockposition, iblockdata, 0);
             world.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 3);
         }