Class ItemUtils
java.lang.Object
net.apartium.cocoabeans.spigot.inventory.ItemUtils
Various utils for working with item stacks
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetInternalName(org.bukkit.Material material) Returns the internal name of the material For 1.8, it will beEnum.name()For 1.13+, it will beMaterial.getKey()static booleanisAirOrNull(org.bukkit.inventory.ItemStack item) Check if given item stack is air or is nullstatic booleanisArmor(org.bukkit.inventory.ItemStack item) Check if given item stack is an armor piece
-
Constructor Details
-
ItemUtils
public ItemUtils()
-
-
Method Details
-
isArmor
public static boolean isArmor(org.bukkit.inventory.ItemStack item) Check if given item stack is an armor piece- Parameters:
item- item stack- Returns:
- true if armor piece, else false
-
isAirOrNull
public static boolean isAirOrNull(org.bukkit.inventory.ItemStack item) Check if given item stack is air or is null- Parameters:
item- given item stack- Returns:
- true if air or null, else false
-
getInternalName
Returns the internal name of the material For 1.8, it will beEnum.name()For 1.13+, it will beMaterial.getKey()- Parameters:
material- material to get the internal name of- Returns:
- internal name of the material
-