summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorfeildmaster <admin@feildmaster.com>2012-03-14 05:22:43 -0500
committerEvilSeph <evilseph@gmail.com>2012-03-15 06:05:49 -0400
commitb4c9ad518a9cc2d777fc829b558eac2d28785681 (patch)
tree0111cd3fd3ad69f0fbcb8d943c4a8ab0b0268e3d /src
parent3054d020d367d59146de33dab363377d1a55c575 (diff)
downloadcraftbukkit-b4c9ad518a9cc2d777fc829b558eac2d28785681.tar
craftbukkit-b4c9ad518a9cc2d777fc829b558eac2d28785681.tar.gz
craftbukkit-b4c9ad518a9cc2d777fc829b558eac2d28785681.tar.lz
craftbukkit-b4c9ad518a9cc2d777fc829b558eac2d28785681.tar.xz
craftbukkit-b4c9ad518a9cc2d777fc829b558eac2d28785681.zip
[Bleeding] Call DamageEvent before CombustEvent for Arrows. Fixes BUKKIT-1100
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/minecraft/server/EntityArrow.java5
1 files 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 ffc219cb..a15397c9 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) {