1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-19 10:22:58 +01:00

Added ability to repair Fishing Rods

This commit is contained in:
Blake Bartenbach
2012-04-22 10:34:27 -05:00
parent 825bc87ca3
commit 3db83db5d2
6 changed files with 34 additions and 16 deletions

View File

@@ -274,7 +274,7 @@ public class ItemChecks {
* @return true if the item is a tool, false otherwise
*/
public static boolean isTool(ItemStack is) {
return isStoneTool(is) || isWoodTool(is) || isGoldTool(is) || isIronTool(is) || isDiamondTool(is) || is.getType().equals(Material.BOW);
return isStoneTool(is) || isWoodTool(is) || isGoldTool(is) || isIronTool(is) || isDiamondTool(is) || isStringTool(is);
}
/**
@@ -317,6 +317,24 @@ public class ItemChecks {
}
}
/**
* Checks to see if an item is a string tool.
*
* @param is Item to check
* @return true if the item is a string tool, false otherwise
*/
public static boolean isStringTool(ItemStack is) {
switch (is.getType()) {
case BOW:
case FISHING_ROD:
return true;
default:
return false;
}
}
/**
* Checks to see if an item is a gold tool.
*