Archiviert
13
0

Fixed durability changing regardless of whether or not damage was successful. Thanks Xolsom!

Note: Plugins may need to update the client to keep it in synch.
Dieser Commit ist enthalten in:
EvilSeph 2011-06-07 01:00:30 -04:00
Ursprung ef9295707a
Commit 6bd509ebde

Datei anzeigen

@ -534,7 +534,12 @@ public abstract class EntityHuman extends EntityLiving {
} }
// CraftBukkit end // 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(); ItemStack itemstack = this.F();
if (itemstack != null && entity instanceof EntityLiving) { if (itemstack != null && entity instanceof EntityLiving) {