Interface ProtoItemStack
public interface ProtoItemStack
Intermediary result for an argument which parses a
Material and optional NBT data.- Since:
- 1.5.0
-
Method Summary
Modifier and TypeMethodDescription@NonNull org.bukkit.inventory.ItemStackcreateItemStack(int stackSize, boolean respectMaximumStackSize) Create a newItemStackfrom the state of thisProtoItemStack.booleanGet whether thisProtoItemStackcontains extra data besides theMaterial.@NonNull org.bukkit.Materialmaterial()Get theMaterialof thisProtoItemStack.
-
Method Details
-
material
@NonNull org.bukkit.Material material()Get theMaterialof thisProtoItemStack.- Returns:
- the
Material - Since:
- 1.5.0
-
hasExtraData
boolean hasExtraData()Get whether thisProtoItemStackcontains extra data besides theMaterial.- Returns:
- whether there is extra data
- Since:
- 1.5.0
-
createItemStack
@NonNull org.bukkit.inventory.ItemStack createItemStack(int stackSize, boolean respectMaximumStackSize) throws IllegalArgumentException Create a newItemStackfrom the state of thisProtoItemStack.- Parameters:
stackSize- stack sizerespectMaximumStackSize- whether to respect the maximum stack size for the material- Returns:
- the created
ItemStack - Throws:
IllegalArgumentException- if theItemStackcould not be created, due to max stack size or other reasons- Since:
- 1.5.0
-