Package com.earth2me.essentials.items
Class FlatItemDb
java.lang.Object
com.earth2me.essentials.items.AbstractItemDb
com.earth2me.essentials.items.FlatItemDb
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.ess3.api.IItemDb
IItemDb.ItemResolver
-
Field Summary
Fields inherited from class com.earth2me.essentials.items.AbstractItemDb
ess, ready
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate a stack from the given name with the maximum stack size for that material.int
getLegacyId
(Material material) Deprecated.Return names recognised by the database, intended for tab-completion.Get the primary name for the given item stack.Get a List of all aliases for the given item stack.void
Methods inherited from class com.earth2me.essentials.items.AbstractItemDb
get, getMatching, getResolver, getResolvers, getResolvers, isReady, isResolverPresent, registerResolver, serialize, serialize, unregisterResolver
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.earth2me.essentials.api.IItemDb
get, getFromLegacy, getFromLegacy, getFromLegacyId, names
-
Constructor Details
-
FlatItemDb
-
-
Method Details
-
reloadConfig
public void reloadConfig() -
get
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)
andIItemDb.get(String, int)
should be sufficient. However, if you intend to perform an item lookup inside aIItemDb.ItemResolver
implementation, you must call this method with useResolvers as false to prevent recursion.- Parameters:
id
- Item name to look up in the databaseuseResolvers
- 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
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
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.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
Description copied from interface:IItemDb
Return names recognised by the database, intended for tab-completion.- Returns:
- Collection of all item names
-