mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
Restored original behavior of Salvage.isSalvageable
It doesn't check for custom armors, I don't know if it's a bug or not Added isMinecraftTool and isMinecraftArmor for clarity
This commit is contained in:
@ -257,6 +257,16 @@ public class ItemChecks {
|
||||
return isHelmet(is) || isChestplate(is) || isLeggings(is) || isBoots(is);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to see if an item is a wearable armor piece.
|
||||
*
|
||||
* @param is Item to check
|
||||
* @return true if the item is armor, false otherwise
|
||||
*/
|
||||
public static boolean isMinecraftArmor(ItemStack is) {
|
||||
return isDiamondArmor(is) || isGoldArmor(is) || isIronArmor(is) || isDiamondArmor(is);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to see if an item is a leather armor piece.
|
||||
*
|
||||
@ -339,7 +349,7 @@ public class ItemChecks {
|
||||
* @param is Item to check
|
||||
* @return true if the item is a tool, false otherwise
|
||||
*/
|
||||
public static boolean isTool(ItemStack is) {
|
||||
public static boolean isMinecraftTool(ItemStack is) {
|
||||
return isStoneTool(is) || isWoodTool(is) || isGoldTool(is) || isIronTool(is) || isDiamondTool(is) || isStringTool(is);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user