diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 72121547..a91ffb17 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -455,8 +455,10 @@ public class CraftEventFactory { if (!(source instanceof EntityDamageSource)) { return false; } - // We don't need to check for null, since EntityDamageSource will always return an event EntityDamageEvent event = handleEntityDamageEvent(entity, source, damage); + if (event == null) { + return false; + } return event.isCancelled() || event.getDamage() == 0; } |