Interface ItemStack

All Known Subinterfaces:
ItemStackSnapshot, LiveItemStack

public interface ItemStack
  • Method Details

    • getType

      @NotNull @NotNull ItemType getType()
      Gets the type of item of this itemStack
      Returns:
      The itemType of this itemStack
    • getQuantity

      int getQuantity()
      Gets the amount of items within this stack
      Returns:
      The amount of items in this itemstack
    • getLore

      List<net.kyori.adventure.text.Component> getLore()
      Gets the lore of the item
      Returns:
      The lore of the item
    • setLore

      ItemStack setLore(Collection<? extends net.kyori.adventure.text.Component> lore)
      Sets the lore of the item
    • setLore

      default ItemStack setLore(net.kyori.adventure.text.Component... lines)
    • setLore

      default ItemStack setLore(net.kyori.adventure.text.ComponentLike... lines)
    • copy

      ItemStack copy()
      Copies this ItemStack
      Returns:
      The copied itemstack
    • copyWithQuantity

      ItemStack copyWithQuantity(int quantity)
      Copies this ItemStack with a specified quantity
      Parameters:
      quantity - The new size
      Returns:
      The copied itemstack
    • getStackData

      Optional<ItemStackData> getStackData()
      Gets the ItemStackData of this item.
      Returns:
      The ItemStackData if there is one
    • setStackData

      void setStackData(ItemStackData data)
      Sets the itemStackData of this item
      Parameters:
      data - The new ItemStackData
      Throws:
      IllegalArgumentException - When the
    • createSnapshot

      ItemStackSnapshot createSnapshot()
      Creates a snapshot of this item
      Returns:
      The created ItemStack Snapshot