From b4c9ad518a9cc2d777fc829b558eac2d28785681 Mon Sep 17 00:00:00 2001 From: feildmaster Date: Wed, 14 Mar 2012 05:22:43 -0500 Subject: [PATCH] [Bleeding] Call DamageEvent before CombustEvent for Arrows. Fixes BUKKIT-1100 --- src/main/java/net/minecraft/server/EntityArrow.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java index ffc219cbea..a15397c91b 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -211,8 +211,9 @@ public class EntityArrow extends Entity { damagesource = DamageSource.arrow(this, this.shooter); } + // CraftBukkit start - moved damage call + if (movingobjectposition.entity.damageEntity(damagesource, l)) { if (this.isBurning() && (!(movingobjectposition.entity instanceof EntityPlayer) || this.world.pvpMode)) { // CraftBukkit - abide by pvp setting if destination is a player. - // CraftBukkit start EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 5); Bukkit.getPluginManager().callEvent(combustEvent); @@ -222,7 +223,7 @@ public class EntityArrow extends Entity { // CraftBukkit end } - if (movingobjectposition.entity.damageEntity(damagesource, l)) { + //if (movingobjectposition.entity.damageEntity(damagesource, l)) { // CraftBukkit if (movingobjectposition.entity instanceof EntityLiving) { ++((EntityLiving) movingobjectposition.entity).aI; if (this.n > 0) {