Package dk.lockfuglsang.minecraft.util
Enum Class ItemStackUtil
- All Implemented Interfaces:
Serializable
,Comparable<ItemStackUtil>
,Constable
Conversion to ItemStack from strings.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder for ItemStackstatic class
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.inventory.ItemStack
asDisplayItem(org.bukkit.inventory.ItemStack item)
static String
asShortString(List<org.bukkit.inventory.ItemStack> items)
static String
asShortString(org.bukkit.inventory.ItemStack item)
static String
asString(org.bukkit.inventory.ItemStack item)
static ItemStackUtil.Builder
builder(org.bukkit.inventory.ItemStack stack)
static List<org.bukkit.inventory.ItemStack>
static org.bukkit.inventory.ItemStack[]
createItemArray(List<org.bukkit.inventory.ItemStack> items)
static List<org.bukkit.inventory.ItemStack>
createItemList(List<String> items)
static org.bukkit.inventory.ItemStack
createItemStack(String displayItem)
static org.bukkit.inventory.ItemStack
createItemStack(String displayItem, String name, String description)
static org.bukkit.inventory.ItemStack
createItemStackSkull(String texture, String name, String description)
static List<ItemStackUtil.ItemProbability>
createItemsWithProbabilty(List<String> items)
static UUID
createUniqueId(String texture, String name, String description)
static String
getItemName(org.bukkit.inventory.ItemStack stack)
static boolean
isValidInventoryItem(org.bukkit.inventory.ItemStack itemStack)
static ItemStackUtil
Returns the enum constant of this class with the specified name.static ItemStackUtil[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
createItemsWithProbabilty
-
createItemList
-
createItemArray
public static org.bukkit.inventory.ItemStack[] createItemArray(List<org.bukkit.inventory.ItemStack> items) -
createItemStack
-
createItemStackSkull
-
createUniqueId
-
createItemStack
-
clone
-
isValidInventoryItem
public static boolean isValidInventoryItem(org.bukkit.inventory.ItemStack itemStack) -
builder
-
asString
-
asShortString
-
asShortString
-
asDisplayItem
public static org.bukkit.inventory.ItemStack asDisplayItem(org.bukkit.inventory.ItemStack item) -
getItemName
-