Gui

class Gui(val guiType: GuiType, val title: Component, val pagesByKey: Map<String, GuiPage>, val pagesByNumber: Map<Int, GuiPage>, val defaultPageKey: String, val eventHandler: GuiEventHandler) : SimpleContainer, MenuProvider(source)

Constructors

Link copied to clipboard
constructor(guiType: GuiType, title: Component, pagesByKey: Map<String, GuiPage>, pagesByNumber: Map<Int, GuiPage>, defaultPageKey: String, eventHandler: GuiEventHandler)

Properties

Link copied to clipboard
val accessor: SimpleContainerAccessor
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val items: NonNullList<ItemStack>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val title: Component
Link copied to clipboard

Functions

Link copied to clipboard
open fun addItem(itemStack: ItemStack): ItemStack
Link copied to clipboard
open fun addListener(containerListener: ContainerListener)
Link copied to clipboard
open fun canAddItem(itemStack: ItemStack): Boolean
Link copied to clipboard
open fun canPlaceItem(i: Int, itemStack: ItemStack): Boolean
Link copied to clipboard
open fun canTakeItem(container: Container, i: Int, itemStack: ItemStack): Boolean
Link copied to clipboard
fun Gui.changePage(fromPage: GuiPage, toPage: GuiPage, overrideEffect: GuiPage.ChangeEffect? = null): Job
Link copied to clipboard
open override fun clearContent()
Link copied to clipboard

Closes this gui for all players viewing it.

Link copied to clipboard
open fun countItem(item: Item): Int
Link copied to clipboard
open override fun createMenu(syncId: Int, inventory: Inventory, player: Player): GuiScreenHandler
Link copied to clipboard
open fun createTag(provider: HolderLookup.Provider): ListTag
Link copied to clipboard
open override fun fillStackedContents(stackedContents: StackedContents)
Link copied to clipboard
open fun fromTag(listTag: ListTag, provider: HolderLookup.Provider)
Link copied to clipboard
open override fun getContainerSize(): Int
Link copied to clipboard
open override fun getDisplayName(): Component
Link copied to clipboard
open override fun getItem(i: Int): ItemStack
Link copied to clipboard
open fun getMaxStackSize(): Int
open fun getMaxStackSize(itemStack: ItemStack): Int
Link copied to clipboard
open fun hasAnyMatching(predicate: Predicate<ItemStack>): Boolean
Link copied to clipboard
open fun hasAnyOf(set: MutableSet<Item>): Boolean
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
suspend fun loadPage(page: GuiPage, offsetHorizontally: Int = 0, offsetVertically: Int = 0)

Loads the specified page with the specified offset.

Link copied to clipboard
suspend fun reloadCurrentPage()

Reloads the current page.

Link copied to clipboard
open fun removeAllItems(): MutableList<ItemStack>
Link copied to clipboard
open override fun removeItem(i: Int, j: Int): ItemStack
Link copied to clipboard
open override fun removeItemNoUpdate(i: Int): ItemStack
Link copied to clipboard
open fun removeItemType(item: Item, i: Int): ItemStack
Link copied to clipboard
open fun removeListener(containerListener: ContainerListener)
Link copied to clipboard
open override fun setChanged()
Link copied to clipboard
open override fun setItem(i: Int, itemStack: ItemStack)
Link copied to clipboard
open fun startOpen(player: Player)
Link copied to clipboard
open override fun stillValid(player: Player): Boolean
Link copied to clipboard
open override fun stopOpen(player: Player)
Link copied to clipboard
open override fun toString(): String