Interface OnyxElement
- All Known Implementing Classes:
OnyxBlockImpl, OnyxItemImpl
public interface OnyxElement
Represents any registered component in OnyxLib (Items, Blocks, etc.)
that can be represented as an ItemStack.
-
Method Summary
-
Method Details
-
getId
String getId()- Returns:
- The string identifier of this element (e.g., "marble")
-
getKey
NamespacedKey getKey()- Returns:
- The underlying Bukkit NamespacedKey for this element
-
create
ItemStack create()Creates a single ItemStack of this element. Automatically applies CustomModelData and PDC tags.- Returns:
- The generated ItemStack.
- Throws:
IllegalStateException- If baseMaterial is not defined.
-
create
Creates an ItemStack of this element with the specified amount. Automatically applies CustomModelData and PDC tags.- Parameters:
amount- The stack size.- Returns:
- The generated ItemStack.
- Throws:
IllegalStateException- If baseMaterial is not defined.
-