SlotCreator

A builder class for configuring individual slots in a GUI.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun icon(item: ItemStack): SlotCreator

Sets the icon (item) for this slot.

fun icon(material: Material, amount: Int = 1, creator: ItemStack.() -> Unit = {}): SlotCreator

Sets the icon (item) for this slot using material and amount.

Link copied to clipboard

Makes the item in this slot unpickable (it will remain in the inventory).

Link copied to clipboard
fun lore(vararg lore: Component): SlotCreator

Sets the lore of the item in this slot using varargs.

fun lore(lore: List<Component>?): SlotCreator

Sets the lore of the item in this slot.

Link copied to clipboard
fun name(name: Component?): SlotCreator

Sets the display name of the item in this slot.

Link copied to clipboard

Registers a click event handler for this slot.

Link copied to clipboard

Makes the item in this slot pickable.

fun pickable(pickable: Boolean): SlotCreator

Sets whether the item in this slot can be picked up by the player.