Class XMaterial
java.lang.Object
com.moyskleytech.obsidian.material.ObsidianMaterial
com.moyskleytech.obsidian.material.implementations.XMaterial
- All Implemented Interfaces:
Comparable<ObsidianMaterial>
A special wrapper around XSeries's XMaterial that will only be used on legacy servers where some Materials are named differently in org.bukkit.Material
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanValidate XMaterial to be functionalorg.bukkit.inventory.ItemStacktoItem()Object a ItemStack of the desired materialorg.bukkit.MaterialObtain the bukkit material associated with this material
-
Constructor Details
-
XMaterial
Build a wrapper around a cryotomorin XMaterial- Parameters:
x- The XMaterial valuekey- the String representing it
-
-
Method Details
-
isSupported
public static boolean isSupported()Validate XMaterial to be functional- Returns:
- true or Throws
-
toMaterial
public org.bukkit.Material toMaterial()Description copied from class:ObsidianMaterialObtain the bukkit material associated with this material- Specified by:
toMaterialin classObsidianMaterial- Returns:
- the enum value associated
-
toItem
public org.bukkit.inventory.ItemStack toItem()Description copied from class:ObsidianMaterialObject a ItemStack of the desired material- Specified by:
toItemin classObsidianMaterial- Returns:
- new ItemStack
-