PagedGuidePage

Represents a GuidePage with multiple pages When building your PagedGui add a page change handler using saveCurrentPage to remember page changes After constructing your PagedGui, use loadCurrentPage to set the correct page for the player

For example:

override fun getGui(player: Player): Gui {
val gui = PagedGui.items()
.setStructure(...)
...
.addPageChangeHandler { _, newPage -> saveCurrentPage(player, newPage) }
return gui.build().apply { loadCurrentPage(player, this) }
}

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val item: ItemProvider

The item representing this page. This will be used in any io.github.pylonmc.pylon.core.guide.button.PageButtons that point to this page.

Link copied to clipboard
open val title: Component

The title of this page, displayed at the top of the GUI when the page is open.

Functions

Link copied to clipboard
abstract fun getGui(player: Player): Gui

Created the page for the given player.

Link copied to clipboard
@NotNull
abstract fun getKey(): @NotNull NamespacedKey
Link copied to clipboard
open override fun key(): @NotNull Key
Link copied to clipboard
open fun loadCurrentPage(player: Player, gui: PagedGui<*>)
Link copied to clipboard
open fun open(player: Player)

Opens the GUI for a player.

Link copied to clipboard
open fun saveCurrentPage(player: Player, page: Int)