Constructor and Description |
---|
Items() |
Modifier and Type | Method and Description |
---|---|
static List<ItemInfo> |
getItemList()
Returns the list of ItemInfo's registered in Vault as an UnmodifiableList.
|
static ItemInfo |
itemById(int typeId)
Deprecated.
|
static ItemInfo |
itemById(int typeId,
short subType)
Deprecated.
|
static ItemInfo |
itemByItem(ItemInfo item) |
static ItemInfo |
itemByName(ArrayList<String> search) |
static ItemInfo |
itemByName(String searchString)
Single item search function, for when we only ever want to return 1 result
|
static ItemInfo[] |
itemByNames(ArrayList<String> search,
boolean multi) |
static ItemInfo |
itemByStack(org.bukkit.inventory.ItemStack itemStack)
Searchs for an ItemInfo from the given ItemStack
|
static ItemInfo |
itemByString(String string)
Search for an item from a given string, useful for user input.
|
static ItemInfo |
itemByType(org.bukkit.Material type)
Gets a relevant ItemInfo by it's Material
|
static ItemInfo |
itemByType(org.bukkit.Material type,
short subType)
Searches for an ItemInfo record by Material and SubTypeID
|
static ItemInfo[] |
itemsByName(String searchString,
boolean multi)
Multi-Item return search for dumping all items with the search string to the player
|
static String |
join(List<String> list,
String glue)
Joins elements of a String array with the glue between them into a String.
|
static String |
join(String[] array,
String glue)
Joins elements of a String array with the glue between them into a String.
|
public Items()
public static List<ItemInfo> getItemList()
@Deprecated public static ItemInfo itemById(int typeId)
@Deprecated public static ItemInfo itemById(int typeId, short subType)
public static ItemInfo itemByStack(org.bukkit.inventory.ItemStack itemStack)
itemStack
- to search onpublic static ItemInfo itemByItem(ItemInfo item)
public static ItemInfo itemByType(org.bukkit.Material type)
type
- of Materialpublic static ItemInfo itemByType(org.bukkit.Material type, short subType)
type
- of MaterialsubType
- to check forpublic static ItemInfo itemByString(String string)
string
- to parsepublic static ItemInfo itemByName(ArrayList<String> search)
public static ItemInfo[] itemByNames(ArrayList<String> search, boolean multi)
public static ItemInfo[] itemsByName(String searchString, boolean multi)
searchString
- to search formulti
- whether to return a list of items or just the firstpublic static ItemInfo itemByName(String searchString)
searchString
- to search forpublic static String join(String[] array, String glue)
array
- of elements to join togetherglue
- what to put between each elementMilkbowl, 2014