summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockTNT.patch
blob: 1af71a5f798ce4f85749dabd37fd160519ef31f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- a/net/minecraft/server/BlockTNT.java
+++ b/net/minecraft/server/BlockTNT.java
@@ -72,6 +72,11 @@
             EntityArrow entityarrow = (EntityArrow) entity;
 
             if (entityarrow.isBurning()) {
+                // CraftBukkit start
+                if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entityarrow, blockposition, Blocks.AIR.getBlockData()).isCancelled()) {
+                    return;
+                }
+                // CraftBukkit end
                 this.a(world, blockposition, entityarrow.shooter instanceof EntityLiving ? (EntityLiving) entityarrow.shooter : null);
                 world.setAir(blockposition);
             }