Class FlatItemDb

java.lang.Object
com.earth2me.essentials.items.AbstractItemDb
com.earth2me.essentials.items.FlatItemDb
All Implemented Interfaces:
IItemDb, IConf, IItemDb

public class FlatItemDb extends AbstractItemDb
  • Constructor Details

  • Method Details

    • reloadConfig

      public void reloadConfig()
    • get

      public ItemStack get(String id, boolean useResolvers) throws Exception
      Description copied from interface: IItemDb
      Create a stack from the given name with the maximum stack size for that material. Note: it is unlikely that external plugins will need to call this method directly. In most cases, IItemDb.get(String) and IItemDb.get(String, int) should be sufficient. However, if you intend to perform an item lookup inside a IItemDb.ItemResolver implementation, you must call this method with useResolvers as false to prevent recursion.
      Parameters:
      id - Item name to look up in the database
      useResolvers - Whether to call other plugins' resolver functions before looking the item up in the database
      Returns:
      The requested item stack with the maximum stack size
      Throws:
      Exception - if the item stack cannot be created
    • nameList

      public List<String> nameList(ItemStack item)
      Description copied from interface: IItemDb
      Get a List of all aliases for the given item stack.
      Parameters:
      item - Item stack whose names to find
      Returns:
      List of all names
    • name

      public String name(ItemStack item)
      Description copied from interface: IItemDb
      Get the primary name for the given item stack.
      Parameters:
      item - Item stack whose name to find
      Returns:
      Primary name of the item
    • getLegacyId

      @Deprecated public int getLegacyId(Material material)
      Deprecated.
      Description copied from interface: IItemDb
      Get the legacy ID for the given material.
      Parameters:
      material - Material to look up
      Returns:
      Legacy ID of given material
    • listNames

      public Collection<String> listNames()
      Description copied from interface: IItemDb
      Return names recognised by the database, intended for tab-completion.
      Returns:
      Collection of all item names