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 Summary

    Modifier and Type
    Method
    Description
    Creates a copy of this item stack.
    enchant(boolean enchant)
    Sets the enchantment glint override for the item.
    boolean
    Checks if the item stack is empty or air.
    modelData(int customModelData, @Nullable PlatformNamespace namespace)
    Sets the custom model data and item model namespace for the item.
  • 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
    • modelData

      @NotNull @NotNull PlatformItemStack modelData(int customModelData, @Nullable @Nullable PlatformNamespace namespace)
      Sets the custom model data and item model namespace for the item.
      Parameters:
      customModelData - the custom model data integer
      namespace - the item model namespace (optional)
      Returns:
      this item stack
      Since:
      2.0.0
    • clone

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