Interface KonquestGuildManager


public interface KonquestGuildManager
A manager for guilds in Konquest.
Author:
Rumsfield
  • Method Details

    • isEnabled

      boolean isEnabled()
      Checks whether guilds are enabled from the Konquest configuration.
      Returns:
      True when guilds are enabled, else false
    • isDiscountEnable

      boolean isDiscountEnable()
      Checks whether guild trade discounts are enabled from the Konquest configuration.
      Returns:
      True when guild trade discounts are enabled, else false
    • isGuild

      boolean isGuild(String name)
      Checks if the given name matches a guild.
      Parameters:
      name - The guild name
      Returns:
      True if the name matches a guild instance
    • getGuild

      KonquestGuild getGuild(String name)
      Gets the guild instance by the given name. Returns null when no guild matches the name.
      Parameters:
      name - The guild name
      Returns:
      The guild instance, or null when name not found
    • getAllGuildNames

      List<String> getAllGuildNames()
      Gets a list of all guild names. This is a convenience method.
      Returns:
      The list of guild names
    • getAllGuilds

      List<? extends KonquestGuild> getAllGuilds()
      Gets all guilds.
      Returns:
      The list of all guilds
    • getEnemyGuilds

      List<? extends KonquestGuild> getEnemyGuilds(KonquestKingdom kingdom)
      Gets all guilds which are not in the given kingdom.
      Parameters:
      kingdom - The kingdom to search for enemy guilds
      Returns:
      The list of enemy guilds
    • getKingdomGuilds

      List<? extends KonquestGuild> getKingdomGuilds(KonquestKingdom kingdom)
      Gets all guilds which are in the same kingdom as the given kingdom.
      Parameters:
      kingdom - The kingdom to search for friendly guilds
      Returns:
      The list of friendly guilds
    • getTownGuild

      KonquestGuild getTownGuild(KonquestTown town)
      Gets the guild of the given town. Returns null when the town has no guild. A town's guild is determined by the guild of the town lord.
      Parameters:
      town - The town to check
      Returns:
      The guild instance of the town, or null if the town has no guild
    • getPlayerGuild

      KonquestGuild getPlayerGuild(org.bukkit.OfflinePlayer player)
      Gets the guild of the given player. Returns null when the player has no guild.
      Parameters:
      player - The player to check
      Returns:
      The guild instance of the player, or null if the player has no guild
    • isArmistice

      boolean isArmistice(KonquestGuild guild1, KonquestGuild guild2)
      Checks whether the two guilds are in an armistice. Guilds in an armistice cannot attack each other. Only enemy guilds can be in an armistice.
      Parameters:
      guild1 - The first guild
      guild2 - The second guild, must be an enemy of the first
      Returns:
      True when both guilds are in an armistice, else false
    • isArmistice

      boolean isArmistice(KonquestOfflinePlayer player1, KonquestOfflinePlayer player2)
      Checks whether the two players' guilds are in an armistice. Guilds in an armistice cannot attack each other. Only enemy guilds can be in an armistice.
      Parameters:
      player1 - The first player
      player2 - The second player, must be an enemy of the first
      Returns:
      True when both players' guilds are in an armistice, else false
    • isArmistice

      boolean isArmistice(KonquestOfflinePlayer player1, KonquestTown town2)
      Checks whether the player's guild is in an armistice with the town. A town's guild is determined by the guild of the town lord. Guilds in an armistice cannot attack each other. Only enemy guilds can be in an armistice.
      Parameters:
      player1 - The player
      town2 - The town, must be an enemy of the player
      Returns:
      True when the player's guild and the town's guild are in an armistice, else false