Uses of Class
com.cryptomorin.xseries.XMaterial
-
Packages that use XMaterial Package Description com.cryptomorin.xseries -
-
Uses of XMaterial in com.cryptomorin.xseries
Fields in com.cryptomorin.xseries declared as XMaterial Modifier and Type Field Description static XMaterial[]XMaterial. VALUESCached array ofvalues()to avoid allocating memory for calling the method every time.Fields in com.cryptomorin.xseries with type parameters of type XMaterial Modifier and Type Field Description static Set<XMaterial>XBlock. CROPSstatic Set<XMaterial>XBlock. DANGEROUSMethods in com.cryptomorin.xseries that return XMaterial Modifier and Type Method Description static XMaterialXBlock. getType(org.bukkit.block.Block block)Deprecated.Not stable, useXBlock.isType(Block, XMaterial)orXBlock.isSimilar(Block, XMaterial)instead.static XMaterialXMaterial. matchXMaterial(org.bukkit.inventory.ItemStack item)Parses the given item as an XMaterial using its material and data value (durability) if not a damageable itemItemStack.getDurability().static XMaterialXMaterial. matchXMaterial(org.bukkit.Material material)Parses the given material as an XMaterial.static XMaterialXMaterial. valueOf(String name)Returns the enum constant of this type with the specified name.static XMaterial[]XMaterial. values()Returns an array containing the constants of this enum type, in the order they are declared.Methods in com.cryptomorin.xseries that return types with arguments of type XMaterial Modifier and Type Method Description protected static Optional<XMaterial>XMaterial. matchDefinedXMaterial(String name, byte data)The main method that parses the given material name and data value as an XMaterial.static Optional<XMaterial>XMaterial. matchXMaterial(int id, byte data)Deprecated.this method loops through all the available materials and matches their ID usinggetId()which takes a really long time.static Optional<XMaterial>XMaterial. matchXMaterial(String name)Parses the given material name as an XMaterial with a given data value in the string if attached.Methods in com.cryptomorin.xseries with parameters of type XMaterial Modifier and Type Method Description booleanXMaterialUtil. isAir(XMaterial material)Check if the material is an air block.static booleanXBlock. isCrop(XMaterial material)Any material that can be planted which is fromXBlock.CROPSstatic booleanXBlock. isDangerous(XMaterial material)Any material that can damage players, usually by interacting with the block.booleanXMaterialUtil. isInteractable(XMaterial material)Checks if this Material can be interacted with.booleanXMaterialUtil. isItem(XMaterial material)Checks if this Material is an obtainable item.static booleanXBlock. isSimilar(org.bukkit.block.Block block, XMaterial material)Same asXBlock.isType(Block, XMaterial)except it also does a simplematchXMaterial(Material)comparison with the given block and material.static booleanXBlock. isType(org.bukkit.block.Block block, XMaterial material)Universal Methodstatic booleanXBlock. setType(org.bukkit.block.Block block, XMaterial material)
-