PageBuilder
Properties
Functions
Link copied to clipboard
Adds a button. A button has custom onClick logic.
Link copied to clipboard
fun changePageByKey(slots: GuiSlotCompound, icon: GuiIcon, pageKey: Any, shouldChange: suspend (GuiClickEvent) -> Boolean = { true }, onChange: suspend (GuiClickEvent) -> Unit? = null)
Adds a page change button, which will open the specified page when clicked.
Link copied to clipboard
fun changePageByNumber(slots: GuiSlotCompound, icon: GuiIcon, pageNumber: Int, shouldChange: suspend (GuiClickEvent) -> Boolean = { true }, onChange: suspend (GuiClickEvent) -> Unit? = null)
Adds a page change button, which will open the specified page when clicked.
Link copied to clipboard
fun <E> compound(slots: GuiSlotCompound.SlotRange.Rectangle, content: AbstractGuiList<E, List<E>>, iconGenerator: suspend (E) -> ItemStack, onClick: suspend (event: GuiClickEvent, element: E) -> Unit? = null): GuiCompound<E>
Creates a new rectangular compound (startSlot and endSlot define the corners of the compound).
Link copied to clipboard
fun compoundScroll(slots: GuiSlotCompound, icon: GuiIcon, compound: GuiCompound<*>, reverse: Boolean, speed: Duration = 1.ticks, scrollDistance: Int = compound.compoundWidth, scrollTimes: Int = compound.compoundHeight)
Adds a compound scroll button.
Link copied to clipboard
fun compoundScrollBackwards(slots: GuiSlotCompound, icon: GuiIcon, compound: GuiCompound<*>, speed: Duration = 1.ticks, scrollTimes: Int = compound.compoundHeight)
Adds a compound scroll button.
Link copied to clipboard
fun compoundScrollForwards(slots: GuiSlotCompound, icon: GuiIcon, compound: GuiCompound<*>, speed: Duration = 1.ticks, scrollTimes: Int = compound.compoundHeight)
Adds a compound scroll button.
Link copied to clipboard
Adds the given element for each given slot to the gui.
Link copied to clipboard
Adds a free slot. A free slot allows player interaction.
Link copied to clipboard
fun nextPage(slots: GuiSlotCompound, icon: GuiIcon, shouldChange: suspend (GuiClickEvent) -> Boolean = { true }, onChange: suspend (GuiClickEvent) -> Unit? = null)
Adds a page change button, which will open the next page when clicked.
Link copied to clipboard
Adds a placeholder. A placeholder ignores any click actions.
Link copied to clipboard
fun previousPage(slots: GuiSlotCompound, icon: GuiIcon, shouldChange: suspend (GuiClickEvent) -> Boolean = { true }, onChange: suspend (GuiClickEvent) -> Unit? = null)
Adds a page change button, which will open the previous page when clicked.
Link copied to clipboard
Sets both effectTo and effectFrom at the same time.