mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 08:36:45 +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,8 +177,10 @@ public class SkillUtils {
|
||||
}
|
||||
|
||||
public static void handleDurabilityChange(ItemStack itemStack, int durabilityModifier) {
|
||||
if (!itemStack.isUnbreakable()) {
|
||||
handleDurabilityChange(itemStack, durabilityModifier, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify the durability of an ItemStack.
|
||||
|
Loading…
Reference in New Issue
Block a user