From 9099e48e74dc2c7d97b67c1a7e72afc64f5ac0dd Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Sun, 22 Jun 2014 22:54:05 -0400 Subject: [PATCH] [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. --- .../java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index eda813ff8a..8d2c80fb28 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) {