Class ItemsUtil
java.lang.Object
com.github.imdabigboss.easydatapack.api.utils.ItemsUtil
Some utilities for items.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisItemArmor(@NonNull org.bukkit.inventory.ItemStack item)Checks if an item is a piece of armorstatic booleanisItemASword(@NonNull org.bukkit.inventory.ItemStack item)Checks if an item is a swordstatic booleanisItemATool(@NonNull org.bukkit.inventory.ItemStack item)Checks if an item is a tool
-
Constructor Details
-
ItemsUtil
public ItemsUtil()
-
-
Method Details
-
isItemATool
public static boolean isItemATool(@NonNull org.bukkit.inventory.ItemStack item)Checks if an item is a tool- Parameters:
item- the item to check- Returns:
- true if the item is a tool, false otherwise
-
isItemASword
public static boolean isItemASword(@NonNull org.bukkit.inventory.ItemStack item)Checks if an item is a sword- Parameters:
item- the item to check- Returns:
- true if the item is a sword, false otherwise
-
isItemArmor
public static boolean isItemArmor(@NonNull org.bukkit.inventory.ItemStack item)Checks if an item is a piece of armor- Parameters:
item- the item to check- Returns:
- true if the item is a piece of armor, false otherwise
-