Package net.glowstone.block
Class ItemTable
java.lang.Object
net.glowstone.block.ItemTable
The lookup table for block and item types.
-
Method Summary
Modifier and TypeMethodDescriptiongetBlock(int id) Deprecated.getBlock(org.bukkit.Material type) Returns theBlockTypefor aMaterial, or null if not a block.getItem(int id) Deprecated.getItem(org.bukkit.Material mat) Returns theItemTypefor aMaterial, or null if not a block.static ItemTableinstance()booleanRegister a new, non-Vanilla ItemType.
-
Method Details
-
instance
-
register
Register a new, non-Vanilla ItemType. It will be assigned an ID automatically.- Parameters:
key- the namespaced key of the ItemTypetype- the ItemType to register.- Returns:
- if the registration was successful
-
getItem
Deprecated. -
getItem
Returns theItemTypefor aMaterial, or null if not a block.- Parameters:
mat- aMaterial- Returns:
matas anItemType
-
getBlock
Deprecated. -
getBlock
Returns theBlockTypefor aMaterial, or null if not a block.- Parameters:
type- aMaterial- Returns:
typeas aBlockType, or null iftypeisn't a block
-