@ -17,6 +17,16 @@ public final class ItemHelper {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether the given item is repairable
|
||||
*
|
||||
* @param item <p>The item to check</p>
|
||||
* @return <p>True if the item is repairable</p>
|
||||
*/
|
||||
public static boolean isRepairable(ItemStack item) {
|
||||
return item.getItemMeta() instanceof Damageable && EnchantmentTarget.BREAKABLE.includes(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the max durability of an item
|
||||
*
|
||||
|
Reference in New Issue
Block a user