diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityHuman.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java index 713b973e..1926bf59 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -534,7 +534,12 @@ public abstract class EntityHuman extends EntityLiving { } // CraftBukkit end - entity.damageEntity(this, i); + // CraftBukkit start - Return when the damage fails so that the item will not lose durability + if (!entity.damageEntity(this, i)) { + return; + } + // CraftBukkit end + ItemStack itemstack = this.F(); if (itemstack != null && entity instanceof EntityLiving) { |