From 4d478fff98f5720590f6a0c8df4d57c679e586b7 Mon Sep 17 00:00:00 2001 From: Indyuce Date: Sun, 3 Apr 2022 00:42:46 +0200 Subject: [PATCH] Fixed 'downgrade on death' --- .../Indyuce/mmoitems/api/interaction/util/DurabilityItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/util/DurabilityItem.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/util/DurabilityItem.java index 30bcbaaa..41995f0e 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/util/DurabilityItem.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/util/DurabilityItem.java @@ -198,7 +198,7 @@ public class DurabilityItem { UpgradeData data = new UpgradeData(new JsonParser().parse((String) uTag.getValue()).getAsJsonObject()); // If it cannot be downgraded (reached min), DEATH - if (data.getLevel() > data.getMin()) + if (data.getLevel() <= data.getMin()) return null; // Remove one level and FULLY repair item