[Bleeding] Add many missing event calls.

This commit is contained in:
GJ
2014-03-27 08:27:59 -04:00
committed by Travis Watkins
parent 286c71329d
commit d4fe10394a
18 changed files with 152 additions and 40 deletions

View File

@@ -911,8 +911,15 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
int j = EnchantmentManager.getFireAspectEnchantmentLevel(this);
if (entity instanceof EntityLiving && j > 0 && !entity.isBurning()) {
flag1 = true;
entity.setOnFire(1);
// CraftBukkit start - Call a combust event when somebody hits with a fire enchanted item
EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 1);
org.bukkit.Bukkit.getPluginManager().callEvent(combustEvent);
if (!combustEvent.isCancelled()) {
flag1 = true;
entity.setOnFire(combustEvent.getDuration());
}
// CraftBukkit end
}
boolean flag2 = entity.damageEntity(DamageSource.playerAttack(this), f);