fixed double firing of EntityDamageByEntityEvent

This commit is contained in:
sunkid authored and Erik Broes committed 2011-12-27 20:21:28 +01:00
1 parent 5adcf526ab
commit 066a95769c
2 files changed
+8 -2

No files matched your search

@@ -587,7 +587,9 @@ public abstract class EntityHuman extends EntityLiving {
// also damage the player in this way. For example, EntitySlime.
// We handle projectiles in their individual classes!
if (!(entity.getBukkitEntity() instanceof Projectile)) {
boolean isProjectile = damagesource instanceof EntityDamageSourceIndirect && ((EntityDamageSourceIndirect) damagesource).getProximateDamageSource().getBukkitEntity() instanceof Projectile;
if (!isProjectile) {
org.bukkit.entity.Entity damager = ((Entity) entity1).getBukkitEntity();
org.bukkit.entity.Entity damagee = this.getBukkitEntity();