SimpleDynamicGuidePage

open class SimpleDynamicGuidePage(key: NamespacedKey, val material: Material, val buttonSupplier: Supplier<List<Item>>) : PagedGuidePage(source)

A simple page that just displays an arbitrary number of items with a header. For example, the research page just displays all the researches for a given addon, with next/previous page buttons and a header.

Next/previous buttons are only shown if there are multiple pages.

Inheritors

Constructors

Link copied to clipboard
constructor(key: NamespacedKey, material: Material, buttonSupplier: Supplier<List<Item>>)

Properties

Link copied to clipboard

Supplies the buttons to be displayed on this page.

Link copied to clipboard
open override val item: ItemStackBuilder

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

The material representing this page. Used for 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
open override fun getGui(player: Player): Gui

Created the page for the given player.

Link copied to clipboard
open fun getHeader(player: Player, buttons: List<Item>): @NotNull PagedGui.Builder<@NotNull Item>

Returns a page containing the header (the top row of the page) and a section for the items to go.

Link copied to clipboard
open override fun getKey(): 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)