diff options
author | t00thpick1 <t00thpick1dirko@gmail.com> | 2014-06-22 22:54:05 -0400 |
---|---|---|
committer | Wesley Wolfe <wesley.d.wolfe+git@gmail.com> | 2014-06-23 16:42:31 -0500 |
commit | 9099e48e74dc2c7d97b67c1a7e72afc64f5ac0dd (patch) | |
tree | 241d3d20a7ec41dc8fe533c6026a49faa0f77094 | |
parent | 6364f59ac40ecad5eea3b2691fc8dd8f7582f008 (diff) | |
download | craftbukkit-9099e48e74dc2c7d97b67c1a7e72afc64f5ac0dd.tar craftbukkit-9099e48e74dc2c7d97b67c1a7e72afc64f5ac0dd.tar.gz craftbukkit-9099e48e74dc2c7d97b67c1a7e72afc64f5ac0dd.tar.lz craftbukkit-9099e48e74dc2c7d97b67c1a7e72afc64f5ac0dd.tar.xz craftbukkit-9099e48e74dc2c7d97b67c1a7e72afc64f5ac0dd.zip |
[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.
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index eda813ff..8d2c80fb 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -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) { |