LayoutImporter

class LayoutImporter(var name: String) : Layout

Constructors

Link copied to clipboard
constructor(name: String)

Properties

Link copied to clipboard
open override 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
suspend fun create()
Link copied to clipboard
open suspend override fun delete()

Deletes this layout.

Link copied to clipboard
suspend fun exists(): Boolean
Link copied to clipboard
open suspend override fun getBoots(): ItemStack?

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

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

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

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

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

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

Returns the hotbar contents as an array of items.

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

Returns the full inventory contents as an array of items.

Link copied to clipboard
open suspend override 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
open suspend override fun setBoots(stack: ItemStack): Layout

Sets the boots item for this layout.

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

Sets the chestplate item for this layout.

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

Sets the helmet item for this layout.

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

Sets the hotbar contents for this layout.

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

Sets the full inventory contents for this layout.

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

Sets the leggings item for this layout.