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

public class SpawnerMaterial extends ObsidianMaterial
Special implementation of ObsidianMaterial to allow Spawners with entity types
  • Constructor Details

    • SpawnerMaterial

      public SpawnerMaterial(org.bukkit.entity.EntityType entity, String key)
      Build a Spawner material for a specified entity
      Parameters:
      entity - The entity to spawn
      key - The key representing the spawner
  • Method Details

    • isSupported

      public static boolean isSupported()
      Validate that the enchant meta data exists on the version of bukkit used
      Returns:
      If Spawner materials can be used
    • 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
    • getMaterial

      public static ObsidianMaterial getMaterial(org.bukkit.inventory.ItemStack itemStack)
      Object the right spawner material from a spawner itemstack
      Parameters:
      itemStack - A item stack containing a spawner
      Returns:
      The correct Material for it