[Bleeding] Ignore damage done by LivingEntity.damage(). Fixes BUKKIT-5666

This matches behavior previous to new damage event API of not throwing
events for plugin-triggered damage.
This commit is contained in:
t00thpick1 2014-06-22 22:54:05 -04:00 committed by Wesley Wolfe
parent 6364f59ac4
commit 9099e48e74

View File

@ -511,6 +511,8 @@ public class CraftEventFactory {
cause = DamageCause.MAGIC;
} else if (source == DamageSource.FALL) {
cause = DamageCause.FALL;
} else if (source == DamageSource.GENERIC) {
return new EntityDamageEvent(entity.getBukkitEntity(), null, modifiers);
}
if (cause != null) {