Interface PlatformItemStack


public interface PlatformItemStack
Represents an item stack in the underlying platform.

This interface provides methods for manipulating item properties like custom model data, enchantment glint, and cloning.

Since:
2.0.0
  • Method Details

    • isAir

      boolean isAir()
      Checks if the item stack is empty or air.
      Returns:
      true if air, false otherwise
      Since:
      2.0.0
    • enchant

      @NotNull @NotNull PlatformItemStack enchant(boolean enchant)
      Sets the enchantment glint override for the item.
      Parameters:
      enchant - true to enable glint, false to disable
      Returns:
      this item stack
      Since:
      2.0.0
    • itemModel

      @NotNull @NotNull PlatformItemStack itemModel(@Nullable @Nullable PlatformNamespace namespace)
      Sets the item model namespace for the item.
      Parameters:
      namespace - the item model namespace (optional)
      Returns:
      this item stack
      Since:
      3.4.0
    • clone

      @NotNull @NotNull PlatformItemStack clone()
      Creates a copy of this item stack.
      Returns:
      the cloned item stack
      Since:
      2.0.0