public final class ItemIds extends Object
Modifier and Type | Method and Description |
---|---|
static org.bukkit.Material |
getBlock(String name)
Get the Material corresponding to the specified block identifier.
|
static Collection<String> |
getIds()
Gets a copy of the list of registered item IDs, in their name-spaced form.
|
static org.bukkit.Material |
getItem(String name)
Get the Material corresponding to the specified item identifier.
|
static String |
getKeyName(org.bukkit.Material mat)
Get the key segment of the string identifier for a specified Material.
|
static String |
getName(org.bukkit.Material mat)
Get the full string identifier for a specified Material.
|
static List<String> |
getTabCompletion(String prefix)
Generates a list of possible tab-completion item ID entries for a given prefix.
|
static boolean |
isValidItem(org.bukkit.Material material)
Verify that a given material is a valid item.
|
static org.bukkit.inventory.ItemStack |
sanitize(org.bukkit.inventory.ItemStack stack)
Convert an ItemStack which may have a type that is unrepresentable as an item to one that
does, or to an empty stack if this is not possible.
|
public static String getName(org.bukkit.Material mat)
mat
- the Material.public static String getKeyName(org.bukkit.Material mat)
mat
- the Material.public static org.bukkit.Material getItem(String name)
name
- the identifier.public static org.bukkit.Material getBlock(String name)
name
- the identifier.public static boolean isValidItem(org.bukkit.Material material)
material
- The material to verify.public static org.bukkit.inventory.ItemStack sanitize(org.bukkit.inventory.ItemStack stack)
stack
- The stack to sanitize.public static Collection<String> getIds()
Copyright © 2021. All rights reserved.