Interface DynamicItemStack
- All Superinterfaces:
Cloneable
-
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a clone of this instance.static @Nullable DynamicItemStackConstructs an ItemStack (similar toHelper.parseItemStack(String)).static DynamicItemStackConstructs a static DynamicItemStack instance.get()Gets the uncloned, regular item, in case the player is not known.Gets the uncloned, player-specific item.getClone()Gets the cloned, regular item, in case the player is not known.Gets the cloned, player-specific item.getInput()Gets the input with which it is possible to recreate the item.booleanGet whether the output is dynamic or static.
-
Method Details
-
getInput
String getInput()Gets the input with which it is possible to recreate the item.May not be exactly what was given with
from(String), as it might make use ofHelper.composeItemStack(org.bukkit.inventory.ItemStack).- Returns:
- The string input of the item
-
get
ItemStack get()Gets the uncloned, regular item, in case the player is not known.- Returns:
- The regular item
-
getClone
ItemStack getClone()Gets the cloned, regular item, in case the player is not known.- Returns:
- The cloned regular item
-
get
-
getClone
-
clone
-
isDynamic
boolean isDynamic()Get whether the output is dynamic or static.- Returns:
trueif the output depends on the player, orfalseif the output is always the same
-
from
Constructs an ItemStack (similar toHelper.parseItemStack(String)).- Parameters:
string- The string to parse- Returns:
- The parsed instance, may be
nullif parsing failed
-
from
Constructs a static DynamicItemStack instance.- Parameters:
is- The itemstack to use as the base for the instance- Returns:
- The created instance
-