# InventoryGUIPageBuilder

class InventoryGUIPageBuilder<T : ForInventory>(type: InventoryType<T>, page: Int)
Content copied to clipboard

## Functions

button
Link copied to clipboard

A button is an item protected from any player actions. If clicked, the specified onClick function is invoked.

fun button(slots: InventorySlotCompound<T>, itemStack: ItemStack, onClick: (InventoryGUIClickEvent<T>) -> Unit)
Content copied to clipboard
changeGUI
Link copied to clipboard

By pressing this button, the player switches to another InventoryGUI. The transition effect is applied.

fun changeGUI(slots: InventorySlotCompound<T>, itemStack: ItemStack, newGUI: () -> InventoryGUI<*>, newPage: Int?, onChange: (InventoryGUIClickEvent<T>) -> Unit?)
Content copied to clipboard
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Content copied to clipboard
freeSlot
Link copied to clipboard

A free slot does not block any player actions. The player can put items in this slot or take items out of it.

fun freeSlot(slots: InventorySlotCompound<T>)
Content copied to clipboard
hashCode
Link copied to clipboard
open override fun hashCode(): Int
Content copied to clipboard
nextPage
Link copied to clipboard

This button always tries to find the next page if clicked, and if a next page exists it is loaded.

fun nextPage(slots: InventorySlotCompound<T>, itemStack: ItemStack, onChange: (InventoryGUIClickEvent<T>) -> Unit?)
Content copied to clipboard
pageChanger
Link copied to clipboard

This is a button which loads the specified toPage if clicked.

fun pageChanger(slots: InventorySlotCompound<T>, itemStack: ItemStack, toPage: Int, onChange: (InventoryGUIClickEvent<T>) -> Unit?)
Content copied to clipboard
placeholder
Link copied to clipboard

An item protected from any player actions. This is not a button.

fun placeholder(slots: InventorySlotCompound<T>, itemStack: ItemStack)
Content copied to clipboard
previousPage
Link copied to clipboard

This button always tries to find the previous page if clicked, and if a previous page exists it is loaded.

fun previousPage(slots: InventorySlotCompound<T>, itemStack: ItemStack, onChange: (InventoryGUIClickEvent<T>) -> Unit?)
Content copied to clipboard
toString
Link copied to clipboard
open override fun toString(): String
Content copied to clipboard

## Properties

page
Link copied to clipboard
val page: Int
Content copied to clipboard
transitionFrom
Link copied to clipboard
var transitionFrom: PageChangeEffect?
Content copied to clipboard
transitionTo
Link copied to clipboard
var transitionTo: PageChangeEffect?
Content copied to clipboard
type
Link copied to clipboard
val type: InventoryType<T>
Content copied to clipboard