GuiCreator

A creator class for building the initial state of a GUI.

Parameters

rows

The number of rows in the GUI.

Properties

Link copied to clipboard
val rows: Int
Link copied to clipboard
var title: Component

The title of the GUI.

Functions

Link copied to clipboard
fun create(): Inventory

Creates a Bukkit inventory based on the current configuration.

Link copied to clipboard
fun GuiCreator.fill(material: Material, pickable: Boolean = false, creator: SlotCreator.() -> Unit = {})

Fills all slots in the GUI with a material.

Link copied to clipboard
fun fillBorder(material: Material, pickable: Boolean = false, creator: SlotCreator.() -> Unit = {})

Fills the border of the GUI with a material.

Link copied to clipboard
fun fillRect(s1: Slot, s2: Slot, material: Material, pickable: Boolean = false, creator: SlotCreator.() -> Unit = {})

Fills a rectangular area defined by two slots with a material.

fun fillRect(x1: Int, y1: Int, x2: Int, y2: Int, material: Material, pickable: Boolean = false, creator: SlotCreator.() -> Unit = {})

Fills a rectangular area with a material.

Link copied to clipboard

Returns a map of configured slots.

Link copied to clipboard
fun slot(slot: Int)

Configures a slot at the specified index.

fun slot(slot: Slot, creator: SlotCreator.() -> Unit)

Configures a slot using a Slot instance.

fun slot(slot: Int, creator: SlotCreator.() -> Unit)

Configures a slot at the specified index with a builder.

fun slot(x: Int, y: Int, creator: SlotCreator.() -> Unit)

Configures a slot by its X and Y coordinates.

Link copied to clipboard
fun GuiCreator.template(template: GuiCreator.() -> Unit)

Includes another builder block as a template.