diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java index c509e60034..aa7e96fd05 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -370,6 +370,8 @@ public abstract class EntityHuman extends EntityLiving { if (event.isCancelled()) { return false; } + + i = event.getDamage(); } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java index e021be0d81..b79d6b911d 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -124,12 +124,13 @@ public abstract class EntityLiving extends Entity { CraftServer server = ((WorldServer) this.world).getServer(); org.bukkit.entity.Entity victim = this.getBukkitEntity(); DamageCause damageType = EntityDamageEvent.DamageCause.SUFFOCATION; + int damage = 1; - EntityDamageEvent event = new EntityDamageEvent(victim, damageType, 1); + EntityDamageEvent event = new EntityDamageEvent(victim, damageType, damage); server.getPluginManager().callEvent(event); if (!event.isCancelled()) { - this.a((Entity) null, 1); + this.a((Entity) null, event.getDamage()); } // CraftBukkit end }