Fix calling CombustEvent caused by enchantment

The CombustEvent created when an Entity attacks with a fire enchanted weapon
was never raised through the plugin manager. Thanks for pointing it out
EdGruberman!
This commit is contained in:
Andrew Ardill 2012-01-09 10:46:07 +11:00
parent 93aed40c4f
commit 67dbe71bd9

View File

@ -844,6 +844,8 @@ public abstract class EntityHuman extends EntityLiving {
if (l > 0) { if (l > 0) {
// CraftBukkit start - raise a combust event when somebody hits with a fire enchanted item // CraftBukkit start - raise a combust event when somebody hits with a fire enchanted item
EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), l*4); EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), l*4);
Bukkit.getPluginManager().callEvent(combustEvent);
if (!combustEvent.isCancelled()) { if (!combustEvent.isCancelled()) {
entity.setOnFire(combustEvent.getDuration()); entity.setOnFire(combustEvent.getDuration());
} }