Class MaterialRegistry

java.lang.Object
ch.njol.skript.aliases.MaterialRegistry

public class MaterialRegistry extends Object
Manages Skript's own number -> Material mappings. They are used to save items as variables.
  • Constructor Details

    • MaterialRegistry

      public MaterialRegistry(org.bukkit.Material[] materials)
      Creates a material registry from existing data.
      Parameters:
      materials - Materials by their number ids.
    • MaterialRegistry

      public MaterialRegistry()
      Creates a new material registry.
  • Method Details

    • load

      public static MaterialRegistry load(String[] names)
      Loads a material registry from an array of strings. New materials will be added and legacy names updated when possible.
      Parameters:
      names - Material names.
      Returns:
      Material registry.
    • getMaterial

      public org.bukkit.Material getMaterial(int id)
    • getId

      public int getId(org.bukkit.Material material)
    • getMaterials

      public org.bukkit.Material[] getMaterials()