Layout

interface Layout

Represents a saved inventory layout within Housing.

Implementations perform sequential behavior and therefore expose suspend functions for better interaction with Housing.

Inheritors

Properties

Link copied to clipboard
abstract var name: String

The name of this layout. This technically does not need to be unique but having multiple layouts with the same name will mess with the API's ability to act on a specific layout, as the name is our only identifier.

Functions

Link copied to clipboard
abstract suspend fun delete()

Deletes this layout.

Link copied to clipboard
abstract suspend fun getBoots(): ItemStack?

Returns the item stored in the boots slot for this layout, or null if empty.

Link copied to clipboard
abstract suspend fun getChestplate(): ItemStack?

Returns the item stored in the chestplate slot for this layout, or null if empty.

Link copied to clipboard
abstract suspend fun getHelmet(): ItemStack?

Returns the item stored in the helmet slot for this layout, or null if empty.

Link copied to clipboard
abstract suspend fun getHotbar(): Array<ItemStack>

Returns the hotbar contents as an array of items.

Link copied to clipboard
abstract suspend fun getInventory(): Array<ItemStack>

Returns the full inventory contents as an array of items.

Link copied to clipboard
abstract suspend fun getLeggings(): ItemStack?

Returns the item stored in the leggings slot for this layout, or null if empty.

Link copied to clipboard
open suspend fun getName(): String

Returns the current name of this layout.

Link copied to clipboard
abstract suspend fun setBoots(stack: ItemStack): Layout

Sets the boots item for this layout.

Link copied to clipboard
abstract suspend fun setChestplate(stack: ItemStack): Layout

Sets the chestplate item for this layout.

Link copied to clipboard
abstract suspend fun setHelmet(stack: ItemStack): Layout

Sets the helmet item for this layout.

Link copied to clipboard
abstract suspend fun setHotbar(stacks: Array<ItemStack>): Layout

Sets the hotbar contents for this layout.

Link copied to clipboard
abstract suspend fun setInventory(stacks: Array<ItemStack>): Layout

Sets the full inventory contents for this layout.

Link copied to clipboard
abstract suspend fun setLeggings(stack: ItemStack): Layout

Sets the leggings item for this layout.