diff options
author | EvilSeph <evilseph@gmail.com> | 2012-02-08 03:19:24 -0500 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-02-08 03:27:34 -0500 |
commit | 274e8a141aa7ff4cad8dffed26cadc410b310ec4 (patch) | |
tree | e2a8c19502e30b0fb517291e879c627977afe0c9 /src/main/java/net/minecraft | |
parent | 4d563342ba36976964a28b1705dd2d3465a91b0f (diff) | |
download | craftbukkit-274e8a141aa7ff4cad8dffed26cadc410b310ec4.tar craftbukkit-274e8a141aa7ff4cad8dffed26cadc410b310ec4.tar.gz craftbukkit-274e8a141aa7ff4cad8dffed26cadc410b310ec4.tar.lz craftbukkit-274e8a141aa7ff4cad8dffed26cadc410b310ec4.tar.xz craftbukkit-274e8a141aa7ff4cad8dffed26cadc410b310ec4.zip |
Made flaming arrows fire EntityCombustByEntity events. Fixes BUKKIT-707
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityArrow.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java index ec883fa8..38eee3f5 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -5,6 +5,7 @@ import java.util.List; // CraftBukkit start import org.bukkit.Bukkit; import org.bukkit.entity.Projectile; +import org.bukkit.event.entity.EntityCombustByEntityEvent; import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.ProjectileHitEvent; @@ -188,7 +189,14 @@ public class EntityArrow extends Entity { } if (this.isBurning()) { - movingobjectposition.entity.setOnFire(5); + // CraftBukkit start + EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 5); + Bukkit.getPluginManager().callEvent(combustEvent); + + if (!combustEvent.isCancelled()) { + movingobjectposition.entity.setOnFire(combustEvent.getDuration()); + } + // CraftBukkit end } // CraftBukkit start |