public class Items
extends java.lang.Object
| Constructor and Description |
|---|
Items() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.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(java.util.ArrayList<java.lang.String> search) |
static ItemInfo |
itemByName(java.lang.String searchString)
Single item search function, for when we only ever want to return 1 result
单一物品搜索功能.
|
static ItemInfo[] |
itemByNames(java.util.ArrayList<java.lang.String> search,
boolean multi) |
static ItemInfo |
itemByStack(org.bukkit.inventory.ItemStack itemStack)
Searchs for an ItemInfo from the given ItemStack
从ItemInfo中搜索给出的ItemStack
|
static ItemInfo |
itemByString(java.lang.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
利用 物品的Material获取ItemInfo
|
static ItemInfo |
itemByType(org.bukkit.Material type,
short subType)
Searches for an ItemInfo record by Material and SubTypeID
搜索ItemInfo利用Material和子类型ID
|
static ItemInfo[] |
itemsByName(java.lang.String searchString,
boolean multi)
Multi-Item return search for dumping all items with the search string to the player
利用String返回多个ID合集给玩家
|
static java.lang.String |
join(java.util.List<java.lang.String> list,
java.lang.String glue)
Joins elements of a String array with the glue between them into a String.
|
static java.lang.String |
join(java.lang.String[] array,
java.lang.String glue)
Joins elements of a String array with the glue between them into a String.
|
public static java.util.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 on
要搜索的ItemStackpublic static ItemInfo itemByType(org.bukkit.Material type)
type - of Materialpublic static ItemInfo itemByType(org.bukkit.Material type, short subType)
type - of MaterialsubType - to check for
短型IDpublic static ItemInfo itemByString(java.lang.String string)
string - to parsepublic static ItemInfo itemByName(java.util.ArrayList<java.lang.String> search)
public static ItemInfo[] itemByNames(java.util.ArrayList<java.lang.String> search, boolean multi)
public static ItemInfo[] itemsByName(java.lang.String searchString, boolean multi)
searchString - to search for
要搜索的multi - whether to return a list of items or just the first
是否要返回item列表public static ItemInfo itemByName(java.lang.String searchString)
searchString - to search for
要搜索的物品public static java.lang.String join(java.lang.String[] array,
java.lang.String glue)
array - of elements to join together
要连接的数组元素glue - what to put between each element
要放到每个元素之间的玩意public static java.lang.String join(java.util.List<java.lang.String> list,
java.lang.String glue)
list - of items to join together
要连接的数组元素glue - what to put between each element
要放到每个元素之间的玩意