mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
Check for Unbreakable tag before handling durability changes
Unsure if this is the best way to stop durability loss when an item is Unbreakable, or if this should be checked before each call to handleDurabilityChange.
This commit is contained in:
parent
5b19e2e9d2
commit
0284728bca
@ -177,7 +177,9 @@ public class SkillUtils {
|
||||
}
|
||||
|
||||
public static void handleDurabilityChange(ItemStack itemStack, int durabilityModifier) {
|
||||
handleDurabilityChange(itemStack, durabilityModifier, 1.0);
|
||||
if (!itemStack.isUnbreakable()) {
|
||||
handleDurabilityChange(itemStack, durabilityModifier, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user