Class BundledItemData

java.lang.Object
com.sk89q.worldedit.world.registry.BundledItemData

public final class BundledItemData extends Object
Provides item data based on the built-in item database that is bundled with WorldEdit.

A new instance cannot be created. Use getInstance() to get an instance.

The data is read from a JSON file that is bundled with WorldEdit. If reading fails (which occurs when this class is first instantiated), then the methods will return nulls for all items.

  • Method Details

    • findById

      @Nullable public BundledItemData.ItemEntry findById(String id)
      Return the entry for the given item ID.
      Parameters:
      id - the ID
      Returns:
      the entry, or null
    • getMaterialById

      @Nullable public ItemMaterial getMaterialById(String id)
      Get the material properties for the given item.
      Parameters:
      id - the string ID
      Returns:
      the material's properties, or null
    • getInstance

      public static BundledItemData getInstance()
      Get a singleton instance of this object.
      Returns:
      the instance