Package konquest.api.model
Interface KonquestKingdom
public interface KonquestKingdom
My kingdom for a horse!
A kingdom is a capital, a collection of towns, and a monument template.
- Author:
- Rumsfield
-
Method Summary
Modifier and TypeMethodDescriptionGets the capital territory instance for this kingdom.getName()Get the name of this kingdom.Gets the town instance by the given name.Gets the list of all town names in this kingdom.ArrayList<? extends KonquestTown>getTowns()Get a list of all towns in this kingdom.booleanChecks whether this kingdom has a town with the given name.booleanChecks whether this kingdom currently has a blanked monument template.booleanChecks whether this kingdom is currently protected from attacks.booleanGet whether the kingdom is peaceful.booleanChecks whether this kingdom is currently the smallest, in terms of players.
-
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
-
isMonumentBlanking
boolean isMonumentBlanking()Checks whether this kingdom currently has a blanked monument template. A monument template is blanked when a player in admin bypass mode edits it. Blanking lasts for 2 minutes after the last block edit. When a kingdom's monument template is blanked, players cannot settle new towns, enemies cannot attack town monuments, and monuments will not refresh.- Returns:
- True when the monument template is blanked, else false
-
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
Gets the list of all town names in this kingdom.- Returns:
- The list of towns
-
hasTown
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
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
-