mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 18:57:32 +00:00
Add Checks to other Tools
This commit is contained in:
1 parent
3730046b3c
commit
41d4ca8c27
1 file changed
+18
@@ -157,10 +157,28 @@ public class ItemNpcTool extends Item {
|
||||
}
|
||||
|
||||
public static boolean isHammer(ItemStack itemStack) {
|
||||
if(itemStack == null)
|
||||
return false;
|
||||
|
||||
if(itemStack.getItem() == null)
|
||||
return false;
|
||||
|
||||
if(!(itemStack.getItem() instanceof ItemNpcTool))
|
||||
return false;
|
||||
|
||||
return itemStack.getItemDamage() == 0;
|
||||
}
|
||||
|
||||
public static boolean isMagicBook(ItemStack itemStack) {
|
||||
if(itemStack == null)
|
||||
return false;
|
||||
|
||||
if(itemStack.getItem() == null)
|
||||
return false;
|
||||
|
||||
if(!(itemStack.getItem() instanceof ItemNpcTool))
|
||||
return false;
|
||||
|
||||
return itemStack.getItemDamage() == 2;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user