Interface OnyxItem
- All Superinterfaces:
OnyxElement
- All Known Implementing Classes:
OnyxItemImpl
Represents a custom item.
Acts as the builder for itself.
-
Method Summary
Modifier and TypeMethodDescriptionSets the underlying vanilla material for this item.displayName(String name) Sets the display name using a legacy string with no italics.displayName(net.kyori.adventure.text.Component component) Sets the display name using an Adventure Component.Provides direct access to the ItemMeta for complex modifications.Sets the relative path to the developer made JSON item model.Sets the relative path to the texture file, WITHOUT the .png extension.Methods inherited from interface OnyxElement
create, create, getId, getKey
-
Method Details
-
baseItem
-
displayName
-
displayName
Sets the display name using an Adventure Component.- Parameters:
component- The display name component.- Returns:
- This OnyxItem instance.
-
texture
Sets the relative path to the texture file, WITHOUT the .png extension. The path is relative to assets//textures/ in your plugin jar. Example: texture("items/strawberry") -> assets/myplugin/textures/items/strawberry.png
- Parameters:
path- The path without extension (e.g., "items/strawberry")- Returns:
- This OnyxItem instance.
-
model
-
itemMeta
-