Package-level declarations

Types

Link copied to clipboard
abstract class Gui(val rows: Int)

Base class for all GUIs.

Link copied to clipboard
data class GuiClickEvent(val player: Player, val slot: Int, val bukkitEvent: InventoryClickEvent)

Context for GUI click events.

Link copied to clipboard
abstract class GuiContext(val rows: Int) : Gui

A context class that provides a more declarative DSL for building GUIs. This class also supports state management.

Link copied to clipboard

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

Link copied to clipboard
annotation class GuiDsl
Link copied to clipboard
object GuiListener : Listener

Listener object for processing GUI events.

Link copied to clipboard
abstract class PaginatedGuiContext<T>(val rows: Int) : GuiContext

A context class for GUIs that support pagination.

Link copied to clipboard
data class Slot(val x: Int, val y: Int)

Represents a slot in a GUI.

Link copied to clipboard

A builder class for configuring individual slots in a GUI.

Functions

Link copied to clipboard
fun Player.awaitChatInput(plugin: Plugin, timeoutTicks: Long? = null, onInput: (Component) -> Unit, onCancel: () -> Unit = {})

Utility for getting chat input from a player.

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 gui(title: Component, rows: Int = 6, creator: GuiCreator.() -> Unit): Inventory

Creates a simple GUI (Inventory) using a DSL.

Link copied to clipboard
fun inventory(rows: Int = 3, title: Component, builder: GuiContext.() -> Unit): Gui

Creates a declarative Gui instance.

Link copied to clipboard
fun <T> paginatedInventory(rows: Int = 6, title: Component, items: List<T> = emptyList(), builder: PaginatedGuiContext<T>.() -> Unit): Gui

Creates a paginated Gui instance.

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

Includes another builder block as a template.