Package kr.toxicity.model.api.platform
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 PlatformItemStackmodelData(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
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 integernamespace- the item model namespace (optional)- Returns:
- this item stack
- Since:
- 2.0.0
-
clone
Creates a copy of this item stack.- Returns:
- the cloned item stack
- Since:
- 2.0.0
-