Interface Item

All Known Implementing Classes:
SpigotItem

public interface Item
Represents a generic item with name, amount, and ownership information.

This interface defines the core API for modifying item properties.

Example Usage:


 Item item = new SpigotItem(Material.DIAMOND_SWORD);
 item.setName("Legendary Sword");
 item.setAmount(1);
 UUID owner = item.getOwner();
 
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the UUID of the item's owner.
    void
    setAmount(int amount)
    Sets the stack amount of the item.
    void
    Sets the display name of the item.
  • Method Details

    • setName

      void setName(String name)
      Sets the display name of the item.
      Parameters:
      name - the new display name for the item
    • setAmount

      void setAmount(int amount)
      Sets the stack amount of the item.
      Parameters:
      amount - the stack size (typically 1-64)
    • getOwner

      UUID getOwner()
      Gets the UUID of the item's owner.
      Returns:
      the owner's UUID, or null if no owner is set