Fix logic error in ItemStack#damage

This commit is contained in:
William Blake Galbreath
2020-04-06 05:13:19 -05:00
parent 8e1e816556
commit c76b42c0eb

View File

@@ -606,7 +606,7 @@ index cf8d77491..2c2ca7d97 100644
+ public void damage(int amount) {
+ ItemMeta itemMeta = getItemMeta();
+ Damageable damageable = (Damageable) itemMeta;
+ damageable.setDamage(damageable.getDamage() - amount);
+ damageable.setDamage(damageable.getDamage() + amount);
+ setItemMeta(itemMeta);
+ }
+