Package org.incendo.cloud.bukkit.data
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 TypeMethodDescriptioncreateItemStack(int stackSize, boolean respectMaximumStackSize) Create a newItemStackfrom the state of thisProtoItemStack.booleanGet whether thisProtoItemStackcontains extra data besides theMaterial.material()Get theMaterialof thisProtoItemStack.
-
Method Details
-
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 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
-