mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-13 11:04:42 +02: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:
@ -177,7 +177,9 @@ public class SkillUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void handleDurabilityChange(ItemStack itemStack, int durabilityModifier) {
|
public static void handleDurabilityChange(ItemStack itemStack, int durabilityModifier) {
|
||||||
handleDurabilityChange(itemStack, durabilityModifier, 1.0);
|
if (!itemStack.isUnbreakable()) {
|
||||||
|
handleDurabilityChange(itemStack, durabilityModifier, 1.0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user