Interface ArenaAPI
public interface ArenaAPI
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Binds a kit to an arena, allowing that kit to be used in the arena.void
Sets the blue spawn location of an arena.void
Sets the center location of an arena.void
Clones an arena with its metadata and actual map, creating a new one with the specified center.void
Sets the first corner location of an arena.void
Sets the second corner location of an arena.void
create
(String name, String displayName, org.bukkit.Location center, org.bukkit.Location redSpawn, org.bukkit.Location blueSpawn) Creates a new arena with the given parameters.void
Deletes an arena by its name.void
displayName
(String name, String newDisplayName) Renames the display name of an arena.Retrieves a list of all arenas.Retrieves a list of all arena display names.Retrieves a list of all available arenas that are not in use.getAvailableArenaByDisplayName
(String kitName, String displayName) Retrieves a list of arenas by their display name and the kit bound to them.getAvailableArenasByKit
(String kitName) Retrieves a list of arenas that are available and have the specified kit bound.boolean
Checks if a kit is bound to an arena.void
Sets the in-use state of an arena.void
Renames an arena.void
Sets the red spawn location of an arena.void
regenerate
(DuelArena arena) Regenerates a DuelArena using WorldEdit (FAWE).void
regeneration
(String name, boolean value) Toggles the regeneration state of an arena.void
Generates a WorldEdit schematic for the specified arena, used for regeneration and cloning.void
teleport
(String name, ArenaLocationKey location, org.bukkit.entity.Player player) Teleports a player to a specific location in an arena using an ArenaLocationKey enum.void
Teleports a player to an arena by its name.void
toggleInUse
(String name) Toggles the in-use state of an arena.void
Toggles a kit for an arena.void
Unbinds a kit from an arena.
-
Method Details
-
create
void create(String name, String displayName, org.bukkit.Location center, org.bukkit.Location redSpawn, org.bukkit.Location blueSpawn) Creates a new arena with the given parameters.- Parameters:
name
- The name of the arena.displayName
- The display name of the arena.center
- The center location of the arena.redSpawn
- The red team spawn location (can be null).blueSpawn
- The blue team spawn location (can be null).
-
teleport
Teleports a player to an arena by its name.- Parameters:
name
- The name of the arena.player
- The player to teleport.
-
teleport
Teleports a player to a specific location in an arena using an ArenaLocationKey enum.- Parameters:
name
- The name of the arena.location
- The specific ArenaLocationKey (e.g., CENTER, RED_SPAWN, BLUE_SPAWN).player
- The player to teleport.
-
delete
Deletes an arena by its name.- Parameters:
name
- The name of the arena to delete.
-
name
Renames an arena.- Parameters:
name
- The current name of the arena.newName
- The new name for the arena.
-
displayName
Renames the display name of an arena.- Parameters:
name
- The current name of the arena.newDisplayName
- The new display name for the arena.
-
bindKit
Binds a kit to an arena, allowing that kit to be used in the arena.- Parameters:
name
- The name of the arena.kit
- The name of the kit to bind.
-
toggleKit
Toggles a kit for an arena.- Parameters:
name
- The name of the arena.kit
- The name of the kit to toggle.
-
hasKit
Checks if a kit is bound to an arena.- Parameters:
name
- The name of the arena.kit
- The name of the kit to check.- Returns:
- True if the kit is bound, false otherwise.
-
unbindKit
Unbinds a kit from an arena.- Parameters:
name
- The name of the arena.kit
- The name of the kit to unbind.
-
inUse
Sets the in-use state of an arena.- Parameters:
name
- The name of the arena.value
- The in-use value (true or false).
-
toggleInUse
Toggles the in-use state of an arena.- Parameters:
name
- The name of the arena.
-
regeneration
Toggles the regeneration state of an arena.- Parameters:
name
- The name of the arena.value
- The regeneration state (true for enabled, false for disabled).- Throws:
InvalidRegenerationStateException
- If an invalid regeneration state is provided.
-
center
Sets the center location of an arena.- Parameters:
name
- The name of the arena.center
- The new center location.
-
redSpawn
Sets the red spawn location of an arena.- Parameters:
name
- The name of the arena.redSpawn
- The new red spawn location.
-
blueSpawn
Sets the blue spawn location of an arena.- Parameters:
name
- The name of the arena.blueSpawn
- The new blue spawn location.
-
corner1
Sets the first corner location of an arena.- Parameters:
name
- The name of the arena.corner1
- The new first corner location.
-
corner2
Sets the second corner location of an arena.- Parameters:
name
- The name of the arena.corner2
- The new second corner location.
-
getAllArenas
Retrieves a list of all arenas.- Returns:
- A list of all DuelArena objects.
-
getAllAvailableArenas
Retrieves a list of all available arenas that are not in use.- Returns:
- A list of available DuelArena objects.
-
getAvailableArenasByKit
Retrieves a list of arenas that are available and have the specified kit bound.- Parameters:
kitName
- The name of the kit.- Returns:
- A list of available DuelArena objects with the kit bound.
-
getAvailableArenaByDisplayName
Retrieves a list of arenas by their display name and the kit bound to them.- Parameters:
kitName
- The name of the kit.displayName
- The display name of the arena.- Returns:
- A list of DuelArena objects matching the criteria.
-
getAllArenasByDisplayName
Retrieves a list of all arena display names.- Returns:
- A list of arena display names.
-
clone
Clones an arena with its metadata and actual map, creating a new one with the specified center.- Parameters:
name
- The name of the arena to clone.center
- The new center location for the cloned arena.- Throws:
InvalidArenaStateException
- If cloning fails due to invalid arena state.
-
schem
Generates a WorldEdit schematic for the specified arena, used for regeneration and cloning.- Parameters:
name
- The name of the arena.
-
regenerate
Regenerates a DuelArena using WorldEdit (FAWE).- Parameters:
arena
- The DuelArena to regenerate.
-