[Bleeding] Fire EntityDamageByEntityEvent's for EnderDragon being hit by Projectiles.

This commit is contained in:
Feildmaster
2012-02-09 21:13:35 -06:00
committed by EvilSeph
parent 7ff8c17568
commit 391ac23c9a
6 changed files with 8 additions and 9 deletions

View File

@@ -36,8 +36,8 @@ public class EntitySmallFireball extends EntityFireball {
boolean stick;
org.bukkit.entity.Entity damagee = movingEntity.getBukkitEntity();
Projectile projectile = (Projectile) this.getBukkitEntity();
if (movingEntity instanceof EntityLiving) {
if (movingEntity instanceof EntityLiving || movingEntity instanceof EntityComplexPart) {
EntityDamageByEntityEvent event = new EntityDamageByEntityEvent(projectile, damagee, EntityDamageEvent.DamageCause.PROJECTILE, 5);
pluginManager.callEvent(event);
@@ -50,6 +50,7 @@ public class EntitySmallFireball extends EntityFireball {
} else {
stick = movingEntity.damageEntity(DamageSource.fireball(this, this.shooter), 5);
}
if (stick) {
// if the fireball 'sticks', ignite the target
EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(projectile, damagee, 5);