Interface KonquestKingdom


public interface KonquestKingdom
My kingdom for a horse! A kingdom is a capital, a collection of towns, and a monument template.
  • Method Details

    • isSmallest

      boolean isSmallest()
      Checks whether this kingdom is currently the smallest, in terms of players.
      Returns:
      True when this kingdom is the smallest, else false
    • isOfflineProtected

      boolean isOfflineProtected()
      Checks whether this kingdom is currently protected from attacks. Kingdoms become protected when there are not enough players online, based on settings in the Konquest configuration. When a kingdom is protected, enemies cannot attack its towns.
      Returns:
      True when this kingdom is protected, else false
    • isPeaceful

      boolean isPeaceful()
      Get whether the kingdom is peaceful. Peaceful kingdoms cannot be attacked, or attack others.
      Returns:
      True if peaceful, else false
    • isCreated

      boolean isCreated()
      Get whether the kingdom is created by players. Non-created kingdoms are the defaults included by Konquest: Barbarians and Neutrals.
      Returns:
      True if created, else false
    • isAdminOperated

      boolean isAdminOperated()
      Get whether the kingdom is operated by admins. Admin kingdoms cannot have player masters or officers, where player-operated kingdoms can. Admin kingdoms are created using admin commands.
      Returns:
      True if admin operated, else false
    • getActiveRelation

      KonquestDiplomacyType getActiveRelation(KonquestKingdom kingdom)
      Get the active diplomatic relationship of this kingdom to the given kingdom.
      Parameters:
      kingdom - The other kingdom to compare
      Returns:
      The diplomacy type of this kingdom relative to the given kingdom
    • getName

      String getName()
      Get the name of this kingdom.
      Returns:
      The name
    • getCapital

      KonquestCapital getCapital()
      Gets the capital territory instance for this kingdom.
      Returns:
      The capital territory
    • getTownNames

      ArrayList<String> getTownNames()
      Gets the list of all town names in this kingdom.
      Returns:
      The list of towns
    • hasTown

      boolean hasTown(String name)
      Checks whether this kingdom has a town with the given name.
      Parameters:
      name - The town name to check
      Returns:
      True when a town exists with the given name in this kingdom, else false
    • getTown

      KonquestTown getTown(String name)
      Gets the town instance by the given name.
      Parameters:
      name - The town name
      Returns:
      The town instance
    • getTowns

      ArrayList<? extends KonquestTown> getTowns()
      Get a list of all towns in this kingdom.
      Returns:
      The list of towns