mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Fix logic error in ItemStack#damage
This commit is contained in:
@@ -606,7 +606,7 @@ index cf8d77491..2c2ca7d97 100644
|
|||||||
+ public void damage(int amount) {
|
+ public void damage(int amount) {
|
||||||
+ ItemMeta itemMeta = getItemMeta();
|
+ ItemMeta itemMeta = getItemMeta();
|
||||||
+ Damageable damageable = (Damageable) itemMeta;
|
+ Damageable damageable = (Damageable) itemMeta;
|
||||||
+ damageable.setDamage(damageable.getDamage() - amount);
|
+ damageable.setDamage(damageable.getDamage() + amount);
|
||||||
+ setItemMeta(itemMeta);
|
+ setItemMeta(itemMeta);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|||||||
Reference in New Issue
Block a user