Class ItemTable

java.lang.Object
net.glowstone.block.ItemTable

public final class ItemTable extends Object
The lookup table for block and item types.
  • Method Details

    • instance

      public static ItemTable instance()
    • register

      public boolean register(org.bukkit.NamespacedKey key, ItemType type)
      Register a new, non-Vanilla ItemType. It will be assigned an ID automatically.
      Parameters:
      key - the namespaced key of the ItemType
      type - the ItemType to register.
      Returns:
      if the registration was successful
    • getItem

      @Deprecated public ItemType getItem(int id)
      Deprecated.
    • getItem

      public ItemType getItem(org.bukkit.Material mat)
      Returns the ItemType for a Material, or null if not a block.
      Parameters:
      mat - a Material
      Returns:
      mat as an ItemType
    • getBlock

      @Deprecated public BlockType getBlock(int id)
      Deprecated.
    • getBlock

      public BlockType getBlock(org.bukkit.Material type)
      Returns the BlockType for a Material, or null if not a block.
      Parameters:
      type - a Material
      Returns:
      type as a BlockType, or null if type isn't a block