House

interface House

Represents a house in Housing.

A House provides accessors and mutators to all major systems in a house.

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

Functions

Link copied to clipboard
abstract fun cancelImport()

Cancels the current import operation if one is running.

Link copied to clipboard
abstract suspend fun createCommand(name: String): Command

Creates a new command with the given name.

Link copied to clipboard
abstract suspend fun createFunction(name: String): Function

Creates a new function with the given name.

Link copied to clipboard
abstract suspend fun createGroup(name: String): Group

Creates a new permission group with the given name.

Link copied to clipboard
abstract suspend fun createInventoryLayout(name: String): Layout

Creates a new inventory layout with the given name.

Link copied to clipboard
abstract suspend fun createMenu(title: String): Menu

Creates a new menu with the given title.

Link copied to clipboard
abstract suspend fun createRegion(name: String): Region

Creates a new region with the given name.

Link copied to clipboard
abstract suspend fun createTeam(name: String): Team

Creates a new team with the given name.

Link copied to clipboard
abstract suspend fun getAllCommands(): List<Command>

Returns all commands defined in this house.

Link copied to clipboard
abstract suspend fun getAllEvents(): List<ActionContainer>

Returns all event action containers present in this house.

Link copied to clipboard
abstract suspend fun getAllFunctions(): List<Function>

Returns all functions defined in this house.

Link copied to clipboard
abstract suspend fun getAllGroups(): List<Group>

Returns all groups defined in this house.

Link copied to clipboard
abstract suspend fun getAllInventoryLayouts(): List<Layout>

Returns all inventory layouts defined in this house.

Link copied to clipboard
abstract suspend fun getAllMenus(): List<Menu>

Returns all menus defined in this house.

Link copied to clipboard
abstract suspend fun getAllNpcs(): List<Npc>

Returns all NPCs defined in this house.

Link copied to clipboard
abstract suspend fun getAllRegions(): List<Region>

Returns all regions defined in this house.

Link copied to clipboard
abstract suspend fun getAllTeams(): List<Team>

Returns all teams defined in this house.

Link copied to clipboard
abstract suspend fun getCommand(name: String): Command?

Retrieves a command by name.

Link copied to clipboard
abstract suspend fun getEvent(event: Event.Events): ActionContainer

Retrieves the action container for a specific event.

Link copied to clipboard
abstract suspend fun getFunction(name: String): Function?

Retrieves a function by name.

Link copied to clipboard
abstract suspend fun getGamerule(gamerule: Gamerule.Gamerules): Boolean

Reads the value of a gamerule.

Link copied to clipboard
abstract suspend fun getGroup(name: String): Group?

Retrieves a permission group by name.

Link copied to clipboard
abstract suspend fun getHouseSettings(): HouseSettings

Returns the house-level settings object.

Link copied to clipboard
abstract suspend fun getInventoryLayout(name: String): Layout?

Retrieves an inventory layout by name.

Link copied to clipboard
abstract suspend fun getMenu(title: String): Menu?

Retrieves a menu by title.

Link copied to clipboard
abstract suspend fun getNpc(name: String): Npc?

Retrieves an NPC by name.

Link copied to clipboard
abstract suspend fun getOpenActionContainer(): ActionContainer?

Returns the currently open action container in the editor, if any.

Link copied to clipboard

Returns the currently open condition container in the editor, if any.

Link copied to clipboard
abstract suspend fun getRegion(name: String): Region?

Retrieves a region by name.

Link copied to clipboard

Returns the configured scoreboard lines for this house.

Link copied to clipboard
abstract suspend fun getTeam(name: String): Team?

Retrieves a team by name.

Link copied to clipboard
abstract fun getTimeRemaining(): Float?

Returns the remaining time (in seconds) for the current import operation, or null if no import is active or if the remaining time is not available.

Link copied to clipboard
abstract fun isImporting(): Boolean

Returns whether an import operation is currently running for this house.

Link copied to clipboard
abstract suspend fun setGamerule(gamerule: Gamerule.Gamerules, newValue: Boolean)

Writes a new value for a gamerule.

Link copied to clipboard
abstract fun setImporting(importing: Boolean)

Sets the importing state for this house.

Link copied to clipboard
abstract suspend fun setScoreboardLines(lines: List<Scoreboard.LineType>)

Sets the scoreboard lines for this house.