TabbedGuidePage

Represents a GuidePage with multiple tabs When building your TabGui add a page change handler using saveCurrentTab to remember page changes After constructing your TabGui, use loadCurrentTab to set the correct page for the player

For example:

override fun getGui(player: Player): Gui {
val gui = TabGui.normal()
.setStructure(...)
...
.addTabChangeHandler { _, newTab -> saveCurrentTab(player, newTab) }
return gui.build().apply { loadCurrentTab(player, this) }
}

Inheritors

Types

Link copied to clipboard

Properties

Link copied to clipboard
@get:NotNull
abstract val key: @NotNull NamespacedKey
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
open fun key(): @NotNull Key
Link copied to clipboard
open fun loadCurrentTab(player: Player, gui: TabGui)
Link copied to clipboard
open fun open(player: Player)

Opens the GUI for a player.

Link copied to clipboard
open fun saveCurrentTab(player: Player, tab: Int)
Link copied to clipboard
open fun shouldDisplay(player: Player): Boolean

Should the page be displayed to said player? If not it won't be added to the button list