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 Type
    Method
    Description
    @NonNull org.bukkit.inventory.ItemStack
    createItemStack(int stackSize, boolean respectMaximumStackSize)
    Create a new ItemStack from the state of this ProtoItemStack.
    boolean
    Get whether this ProtoItemStack contains extra data besides the Material.
    @NonNull org.bukkit.Material
    Get the Material of this ProtoItemStack.
  • Method Details

    • material

      @NonNull org.bukkit.Material material()
      Get the Material of this ProtoItemStack.
      Returns:
      the Material
      Since:
      1.5.0
    • hasExtraData

      boolean hasExtraData()
      Get whether this ProtoItemStack contains extra data besides the Material.
      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 new ItemStack from the state of this ProtoItemStack.
      Parameters:
      stackSize - stack size
      respectMaximumStackSize - whether to respect the maximum stack size for the material
      Returns:
      the created ItemStack
      Throws:
      IllegalArgumentException - if the ItemStack could not be created, due to max stack size or other reasons
      Since:
      1.5.0