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 TypeMethodDescription@NotNull PlatformItemStackclone()Creates a copy of this item stack.@NotNull PlatformItemStackenchant(boolean enchant) Sets the enchantment glint override for the item.booleanisAir()Checks if the item stack is empty or air.@NotNull PlatformItemStackitemModel(@Nullable PlatformNamespace namespace) Sets the 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
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
Sets the item model namespace for the item.- Parameters:
namespace- the item model namespace (optional)- Returns:
- this item stack
- Since:
- 3.4.0
-
clone
Creates a copy of this item stack.- Returns:
- the cloned item stack
- Since:
- 2.0.0
-