SimpleInventoryBuilder

class SimpleInventoryBuilder(val player: Player, val slotType: InventoryType, val title: Component) : Listener, InventoryBuilder

Constructors

Link copied to clipboard
constructor(player: Player, slotType: InventoryType, title: Component)

Properties

Link copied to clipboard
val closeHandlers: ArrayList<InventoryCloseEvent.() -> Unit>
Link copied to clipboard
open override val id: UUID

The inventory id

Link copied to clipboard
open lateinit override var inventory: Inventory

The built inventory

Link copied to clipboard
open override val player: Player

The owner of this inventory

Link copied to clipboard
open override val slots: HashMap<Int, Slot>

The slots

Link copied to clipboard
open override val slotType: InventoryType

The slotType

Link copied to clipboard
open override val title: Component

The title of this inventory

Functions

Link copied to clipboard
open override fun build(): Inventory

Builds the current builder into the Bukkit API's Inventory

Link copied to clipboard
open override fun close()

Close inventory for the current player

Link copied to clipboard
open override fun destroy()

Destroys the current builder and the built inventory. The inventory will be closed for the player too.

Link copied to clipboard
open override fun onClose(handler: InventoryCloseEvent.() -> Unit)

On close inventory

Link copied to clipboard
open override fun slot(slot: Int, item: ItemStack)

Registers a slot

open override fun slot(slot: Int, item: ItemStack, handler: InventoryClickEvent.() -> Unit)

Registers a slot with a click listener