summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r--src/main/java/net/minecraft/server/EntityLiving.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index fd1327a4..f8dd4177 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -957,11 +957,13 @@ public abstract class EntityLiving extends Entity {
// CraftBukkit start
if (i > 0) {
EntityDamageEvent event = CraftEventFactory.callEntityDamageEvent(null, this, EntityDamageEvent.DamageCause.FALL, i);
- if (!event.isCancelled()) {
- i = event.getDamage();
- if (i > 0) {
- this.getBukkitEntity().setLastDamageCause(event);
- }
+ if (event.isCancelled()) {
+ return;
+ }
+
+ i = event.getDamage();
+ if (i > 0) {
+ this.getBukkitEntity().setLastDamageCause(event);
}
}
// CraftBukkit end