InventoryGUIPageBuilder

class InventoryGUIPageBuilder<T : ForInventory>(type: InventoryType<T>, page: Int)

Functions

button
Link copied to clipboard
fun button(slots: InventorySlotCompound<T>, itemStack: ItemStack, onClick: (InventoryGUIClickEvent<T>) -> Unit)
A button is an item protected from any player actions.
changeGUI
Link copied to clipboard
fun changeGUI(slots: InventorySlotCompound<T>, icon: ItemStack, newGUI: () -> InventoryGUI<*>, newPage: Int? = null, onChange: (InventoryGUIClickEvent<T>) -> Unit? = null)
By pressing this button, the player switches to another InventoryGUI.
compoundScroll
Link copied to clipboard
fun compoundScroll(slots: InventorySlotCompound<T>, icon: ItemStack, compound: InventoryGUIRectSpaceCompound<T, *>, scrollTimes: Int = 1, reverse: Boolean = false)
By pressing this button, the user scrolls forwards or backwards in the compound.
fun compoundScroll(slots: InventorySlotCompound<T>, icon: ItemStack, compound: InventoryGUISpaceCompound<T, *>, scrollDistance: Int = 1, scrollTimes: Int = 1, reverse: Boolean = false)
By pressing this button, the user scrolls forwards or backwards in the compound.
compoundSpace
Link copied to clipboard
fun <E> compoundSpace(slots: InventorySlotCompound<T>, compound: AbstractInventoryGUISpaceCompound<T, E>)
Defines an area where the content of the given compound is displayed.
createCompound
Link copied to clipboard
fun <E> createCompound(iconGenerator: (E) -> ItemStack, onClick: (clickEvent: InventoryGUIClickEvent<T>, E) -> Unit): InventoryGUISpaceCompound<T, E>
Creates a new compound, holding data which can be displayed in any compound space.
fun <E> createCompound(fromSlot: SingleInventorySlot<out T>, toSlot: SingleInventorySlot<out T>, iconGenerator: (E) -> ItemStack, onClick: (clickEvent: InventoryGUIClickEvent<T>, E) -> Unit): InventoryGUIRectSpaceCompound<T, E>
Creates a new compound, holding data which can be displayed in any compound space.
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
freeSlot
Link copied to clipboard
fun freeSlot(slots: InventorySlotCompound<T>)
A free slot does not block any player actions.
hashCode
Link copied to clipboard
open fun hashCode(): Int
nextPage
Link copied to clipboard
fun nextPage(slots: InventorySlotCompound<T>, icon: ItemStack, onChange: (InventoryGUIClickEvent<T>) -> Unit? = null)
This button always tries to find the next page if clicked, and if a next page exists it is loaded.
pageChanger
Link copied to clipboard
fun pageChanger(slots: InventorySlotCompound<T>, icon: ItemStack, toPage: Int, onChange: (InventoryGUIClickEvent<T>) -> Unit? = null)
This is a button which loads the specified toPage if clicked.
placeholder
Link copied to clipboard
fun placeholder(slots: InventorySlotCompound<T>, itemStack: ItemStack)
An item protected from any player actions.
previousPage
Link copied to clipboard
fun previousPage(slots: InventorySlotCompound<T>, icon: ItemStack, onChange: (InventoryGUIClickEvent<T>) -> Unit? = null)
This button always tries to find the previous page if clicked, and if a previous page exists it is loaded.
toString
Link copied to clipboard
open fun toString(): String

Properties

page
Link copied to clipboard
val page: Int
transitionFrom
Link copied to clipboard
var transitionFrom: PageChangeEffect? = null
transitionTo
Link copied to clipboard
var transitionTo: PageChangeEffect? = null