Builder

class Builder

Represents the UiBuilder

Constructors

Link copied to clipboard
fun Builder()

Creates a new Ui Builder

Link copied to clipboard
fun Builder(title: String)

Creates a new Ui Builder

Link copied to clipboard
fun Builder(title: String, slots: Int)

Creates a new Ui Builder

Functions

Link copied to clipboard
fun build(player: Player, openUi: Boolean = true): SimpleUi

Builds the UI

Link copied to clipboard
fun closeAfterClick(closeAfterClick: Boolean = true): SimpleUi.Builder

Should the Ui close after an entry is clicked?

Link copied to clipboard
fun entries(vararg entries: UiEntry): SimpleUi.Builder
fun entries(entries: Map<Int, UiEntry>, override: Boolean = true): SimpleUi.Builder

Adds the given entries to the UI

Link copied to clipboard
fun entry(slot: Int, item: ItemStack, action: (UiAction) -> Unit): SimpleUi.Builder

Adds an entry to the UI

fun entry(slot: Int, item: ItemStack): SimpleUi.Builder

Adds an entry to the UI with no action

Link copied to clipboard

Sets the slots of the UI

Link copied to clipboard

Sets the title of the UI