Package konquest.api.model
Interface KonquestGuild
public interface KonquestGuild
A guild is a group of kingdom members.
- Author:
- Rumsfield
-
Method Summary
Modifier and TypeMethodDescriptionGets the list of all other guilds in an armistice with this one.Gets the kingdom of this guild.Gets the UUID of the guild master.getName()Gets the name of this guild.org.bukkit.OfflinePlayerConvenience method for getting the Bukkit OfflinePlayer instance for the guild master.ArrayList<org.bukkit.OfflinePlayer>Gets the list of guild members, including all officers and the guild master.ArrayList<org.bukkit.OfflinePlayer>Gets the list of guild members, excluding all officers and the guild master.ArrayList<org.bukkit.OfflinePlayer>Gets the list of guild officers, including the guild master.ArrayList<org.bukkit.OfflinePlayer>Gets the list of guild officers, excluding the guild master.org.bukkit.entity.Villager.ProfessionGets the trade specialization of this guild.booleanisArmistice(KonquestGuild guild) Checks whether this guild and the given guild are in an armistice.booleanChecks whether the given UUID is the guild master.booleanChecks if the guild has a valid guild master.booleanChecks whether the given UUID is a guild member.booleanChecks whether the given UUID is a guild officer.booleanisOpen()Checks whether this guild is open.booleanisSanction(KonquestGuild guild) Checks whether this guild has sanctioned the given guild.booleanisTownMember(KonquestTown town) Checks whether the given town is a member of this guild.
-
Method Details
-
isOpen
boolean isOpen()Checks whether this guild is open. Open guilds allow any friendly kingdom member to join.- Returns:
- True when the guild is open, else false
-
getName
String getName()Gets the name of this guild.- Returns:
- The guild name
-
getSpecialization
org.bukkit.entity.Villager.Profession getSpecialization()Gets the trade specialization of this guild.- Returns:
- The villager profession trade specialization
-
getKingdom
KonquestKingdom getKingdom()Gets the kingdom of this guild.- Returns:
- The kingdom
-
isMaster
Checks whether the given UUID is the guild master.- Parameters:
id- The UUID to check- Returns:
- True when the given UUID is the guild master, else false
-
isOfficer
Checks whether the given UUID is a guild officer. Both the guild master and general officers will return true.- Parameters:
id- The UUID to check- Returns:
- True when the given UUID is a guild officer, else false
-
isMember
Checks whether the given UUID is a guild member. The guild master, all guild officers, and all other guild members will return true.- Parameters:
id- The UUID to check- Returns:
- True when the given UUID is a guild member, else false
-
isMasterValid
boolean isMasterValid()Checks if the guild has a valid guild master.- Returns:
- True when the guild master exists, else false
-
getMaster
UUID getMaster()Gets the UUID of the guild master. Can be null.- Returns:
- The UUID of the guild master
-
getPlayerMaster
org.bukkit.OfflinePlayer getPlayerMaster()Convenience method for getting the Bukkit OfflinePlayer instance for the guild master. Can be null.- Returns:
- The guild master player instance
-
getPlayerOfficers
ArrayList<org.bukkit.OfflinePlayer> getPlayerOfficers()Gets the list of guild officers, including the guild master.- Returns:
- The list of players
-
getPlayerOfficersOnly
ArrayList<org.bukkit.OfflinePlayer> getPlayerOfficersOnly()Gets the list of guild officers, excluding the guild master.- Returns:
- The list of players
-
getPlayerMembers
ArrayList<org.bukkit.OfflinePlayer> getPlayerMembers()Gets the list of guild members, including all officers and the guild master.- Returns:
- The list of players
-
getPlayerMembersOnly
ArrayList<org.bukkit.OfflinePlayer> getPlayerMembersOnly()Gets the list of guild members, excluding all officers and the guild master.- Returns:
- The list of players
-
isSanction
Checks whether this guild has sanctioned the given guild.- Parameters:
guild- The other guild- Returns:
- True when this guild has sanctioned the other, else false
-
isArmistice
Checks whether this guild and the given guild are in an armistice.- Parameters:
guild- The other guild- Returns:
- True when both guilds are in an armistice, else false
-
getArmisticeNames
Gets the list of all other guilds in an armistice with this one. Only guilds from enemy kingdoms can be in an armistice.- Returns:
- The list of enemy guilds in an armistice
-
isTownMember
Checks whether the given town is a member of this guild. A town is a member if the town's lord is a guild member.- Parameters:
town- The town to check- Returns:
- True when the town is a member, else false
-