java.lang.Object
com.moyskleytech.obsidian.material.ObsidianMaterial
com.moyskleytech.obsidian.material.implementations.XMaterial
All Implemented Interfaces:
Comparable<ObsidianMaterial>

public class XMaterial extends 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 Details

    • XMaterial

      public XMaterial(com.cryptomorin.xseries.XMaterial x, String key)
      Build a wrapper around a cryotomorin XMaterial
      Parameters:
      x - The XMaterial value
      key - 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: ObsidianMaterial
      Obtain the bukkit material associated with this material
      Specified by:
      toMaterial in class ObsidianMaterial
      Returns:
      the enum value associated
    • toItem

      public org.bukkit.inventory.ItemStack toItem()
      Description copied from class: ObsidianMaterial
      Object a ItemStack of the desired material
      Specified by:
      toItem in class ObsidianMaterial
      Returns:
      new ItemStack