From e3b4dd3d9a663d5e76a9c9fdd026cbf9f199dc38 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 8 Jul 2016 11:20:15 +1000 Subject: [PATCH] Call EntityChangeBlockEvent for Fire Arrows hitting TNT --- nms-patches/BlockTNT.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 nms-patches/BlockTNT.patch diff --git a/nms-patches/BlockTNT.patch b/nms-patches/BlockTNT.patch new file mode 100644 index 0000000000..ef5838b949 --- /dev/null +++ b/nms-patches/BlockTNT.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/server/BlockTNT.java ++++ b/net/minecraft/server/BlockTNT.java +@@ -75,6 +75,11 @@ + EntityArrow entityarrow = (EntityArrow) entity; + + if (entityarrow.isBurning()) { ++ // CraftBukkit start ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entityarrow, blockposition, Blocks.AIR, 0).isCancelled()) { ++ return; ++ } ++ // CraftBukkit end + this.a(world, blockposition, world.getType(blockposition).set(BlockTNT.EXPLODE, Boolean.valueOf(true)), entityarrow.shooter instanceof EntityLiving ? (EntityLiving) entityarrow.shooter : null); + world.setAir(blockposition); + }