Interface ArenaAPI


public interface ArenaAPI
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bindKit(String name, String kit)
    Binds a kit to an arena, allowing that kit to be used in the arena.
    void
    blueSpawn(String name, org.bukkit.Location blueSpawn)
    Sets the blue spawn location of an arena.
    void
    center(String name, org.bukkit.Location center)
    Sets the center location of an arena.
    void
    clone(String name, org.bukkit.Location center)
    Clones an arena with its metadata and actual map, creating a new one with the specified center.
    void
    corner1(String name, org.bukkit.Location corner1)
    Sets the first corner location of an arena.
    void
    corner2(String name, org.bukkit.Location corner2)
    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
    delete(String name)
    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.
    Retrieves a list of arenas by their display name and the kit bound to them.
    Retrieves a list of arenas that are available and have the specified kit bound.
    boolean
    hasKit(String name, String kit)
    Checks if a kit is bound to an arena.
    void
    inUse(String name, Boolean value)
    Sets the in-use state of an arena.
    void
    name(String name, String newName)
    Renames an arena.
    void
    redSpawn(String name, org.bukkit.Location redSpawn)
    Sets the red spawn location of an arena.
    void
    Regenerates a DuelArena using WorldEdit (FAWE).
    void
    regeneration(String name, boolean value)
    Toggles the regeneration state of an arena.
    void
    schem(String name)
    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
    teleport(String name, org.bukkit.entity.Player player)
    Teleports a player to an arena by its name.
    void
    Toggles the in-use state of an arena.
    void
    toggleKit(String name, String kit)
    Toggles a kit for an arena.
    void
    unbindKit(String name, String kit)
    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

      void teleport(String name, org.bukkit.entity.Player player)
      Teleports a player to an arena by its name.
      Parameters:
      name - The name of the arena.
      player - The player to teleport.
    • teleport

      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.
      Parameters:
      name - The name of the arena.
      location - The specific ArenaLocationKey (e.g., CENTER, RED_SPAWN, BLUE_SPAWN).
      player - The player to teleport.
    • delete

      void delete(String name)
      Deletes an arena by its name.
      Parameters:
      name - The name of the arena to delete.
    • name

      void name(String name, String newName)
      Renames an arena.
      Parameters:
      name - The current name of the arena.
      newName - The new name for the arena.
    • displayName

      void displayName(String name, String newDisplayName)
      Renames the display name of an arena.
      Parameters:
      name - The current name of the arena.
      newDisplayName - The new display name for the arena.
    • bindKit

      void bindKit(String name, String kit)
      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

      void toggleKit(String name, String kit)
      Toggles a kit for an arena.
      Parameters:
      name - The name of the arena.
      kit - The name of the kit to toggle.
    • hasKit

      boolean hasKit(String name, String kit)
      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

      void unbindKit(String name, String kit)
      Unbinds a kit from an arena.
      Parameters:
      name - The name of the arena.
      kit - The name of the kit to unbind.
    • inUse

      void inUse(String name, Boolean value)
      Sets the in-use state of an arena.
      Parameters:
      name - The name of the arena.
      value - The in-use value (true or false).
    • toggleInUse

      void toggleInUse(String name)
      Toggles the in-use state of an arena.
      Parameters:
      name - The name of the arena.
    • regeneration

      void regeneration(String name, boolean value) throws InvalidRegenerationStateException
      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

      void center(String name, org.bukkit.Location center)
      Sets the center location of an arena.
      Parameters:
      name - The name of the arena.
      center - The new center location.
    • redSpawn

      void redSpawn(String name, org.bukkit.Location redSpawn)
      Sets the red spawn location of an arena.
      Parameters:
      name - The name of the arena.
      redSpawn - The new red spawn location.
    • blueSpawn

      void blueSpawn(String name, org.bukkit.Location blueSpawn)
      Sets the blue spawn location of an arena.
      Parameters:
      name - The name of the arena.
      blueSpawn - The new blue spawn location.
    • corner1

      void corner1(String name, org.bukkit.Location corner1)
      Sets the first corner location of an arena.
      Parameters:
      name - The name of the arena.
      corner1 - The new first corner location.
    • corner2

      void corner2(String name, org.bukkit.Location corner2)
      Sets the second corner location of an arena.
      Parameters:
      name - The name of the arena.
      corner2 - The new second corner location.
    • getAllArenas

      List<DuelArena> getAllArenas()
      Retrieves a list of all arenas.
      Returns:
      A list of all DuelArena objects.
    • getAllAvailableArenas

      List<DuelArena> getAllAvailableArenas()
      Retrieves a list of all available arenas that are not in use.
      Returns:
      A list of available DuelArena objects.
    • getAvailableArenasByKit

      List<DuelArena> getAvailableArenasByKit(String kitName)
      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

      List<DuelArena> getAvailableArenaByDisplayName(String kitName, String displayName)
      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

      List<String> getAllArenasByDisplayName()
      Retrieves a list of all arena display names.
      Returns:
      A list of arena display names.
    • clone

      void clone(String name, org.bukkit.Location center) throws InvalidArenaStateException
      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

      void schem(String name)
      Generates a WorldEdit schematic for the specified arena, used for regeneration and cloning.
      Parameters:
      name - The name of the arena.
    • regenerate

      void regenerate(DuelArena arena)
      Regenerates a DuelArena using WorldEdit (FAWE).
      Parameters:
      arena - The DuelArena to regenerate.