Class RegionsFile

java.lang.Object
me.tayebyassine.homestead.resources.ResourceFile
me.tayebyassine.homestead.resources.files.RegionsFile

public final class RegionsFile extends ResourceFile
Typed accessor for regions.yml.
  • Constructor Details

  • Method Details

    • isCleanStartupEnabled

      public boolean isCleanStartupEnabled()
      Whether invalid data should be cleaned up on startup.
      Returns:
      true if clean-startup is enabled, defaults to true
    • isInstantTrustSystemEnabled

      public boolean isInstantTrustSystemEnabled()
      Whether the instant trust-acceptance system is enabled.
      Returns:
      true if trust acceptance is skipped, defaults to false
    • teleportPlayersBackToTegionSpawnWhenEnteringEndExitPortal

      public boolean teleportPlayersBackToTegionSpawnWhenEnteringEndExitPortal()
      Whether players should be teleported back to region spawn when entering the End exit portal.
      Returns:
      true if teleportation is active, defaults to false
    • isRegionProtectionDisabledInDisabledWorlds

      public boolean isRegionProtectionDisabledInDisabledWorlds()
      Whether region protection should be ignored for actions in disabled worlds.
      Returns:
      true to bypass protection, defaults to false
    • isTntRestrictedToBelowSeaLevel

      public boolean isTntRestrictedToBelowSeaLevel()
      Whether TNT should only explode below sea level inside regions.
      Returns:
      true to restrict TNT, defaults to false
    • getChunkPrice

      public double getChunkPrice()
      The price charged per claimed chunk.
      Returns:
      chunk price, defaults to 0.0
    • isWelcomeMessageEnabled

      public boolean isWelcomeMessageEnabled()
      Whether the join welcome message is enabled.
      Returns:
      true if enabled, defaults to false
    • getWelcomeMessage

      public String getWelcomeMessage()
      The welcome message sent to players on join.
      Returns:
      welcome message text
    • isWelcomeSignEnabled

      public boolean isWelcomeSignEnabled()
      Whether the welcome-sign feature is enabled.
      Returns:
      true if enabled, defaults to false
    • isEnterExitRegionMessageEnabled

      public boolean isEnterExitRegionMessageEnabled()
      Whether enter/exit region messages are enabled.
      Returns:
      true if enabled, defaults to false
    • getEnterExitRegionMessageType

      public String getEnterExitRegionMessageType()
      The message delivery type (e.g. "chat", "title", "actionbar").
      Returns:
      the message type string
    • getRegionEnterTitle

      public List<String> getRegionEnterTitle()
      The title lines shown when a player enters a region.
      Returns:
      title lines, never null
    • getRegionEnterActionbar

      public String getRegionEnterActionbar()
      The action-bar message shown when a player enters a region.
      Returns:
      action-bar text
    • getRegionEnterChat

      public String getRegionEnterChat()
      The chat message shown when a player enters a region.
      Returns:
      chat message text
    • getRegionExitTitle

      public List<String> getRegionExitTitle()
      The title lines shown when a player exits a region.
      Returns:
      title lines, never null
    • getRegionExitActionbar

      public String getRegionExitActionbar()
      The action-bar message shown when a player exits a region.
      Returns:
      action-bar text
    • getRegionExitChat

      public String getRegionExitChat()
      The chat message shown when a player exits a region.
      Returns:
      chat message text
    • isBordersEnabled

      public boolean isBordersEnabled()
      Whether the chunk-border visualisation is enabled.
      Returns:
      true if borders are active, defaults to false
    • getBordersBlockType

      public String getBordersBlockType()
      The block type used for chunk borders.
      Returns:
      the material name string
    • getDustColor

      public org.bukkit.Color getDustColor(RegionsFile.DustColorType type)
      The RGB colour list for a specific dust-colour type.
      Parameters:
      type - the dust colour category
      Returns:
      RGB values as an Color
    • getDustSize

      public float getDustSize()
      The particle dust size for border visualisation.
      Returns:
      dust size, defaults to 3.0F
    • isAdjacentChunksRuleEnabled

      public boolean isAdjacentChunksRuleEnabled()
      Whether the adjacent-chunks rule is enabled (auto-claim neighbours).
      Returns:
      true if enabled, defaults to false
    • isSubAreasEnabled

      public boolean isSubAreasEnabled()
      Whether the sub-area system is enabled.
      Returns:
      true if enabled, defaults to false
    • isRewardsEnabled

      public boolean isRewardsEnabled()
      Whether the member-reward system is enabled.
      Returns:
      true if enabled, defaults to false
    • getRewardChunksPerMember

      public int getRewardChunksPerMember()
      The chunk bonus awarded per trusted member.
      Returns:
      bonus chunks per member, defaults to 0
    • getRewardSubAreasPerMember

      public int getRewardSubAreasPerMember()
      The sub-area bonus awarded per trusted member.
      Returns:
      bonus sub-areas per member, defaults to 0
    • getRewardsByPlaytime

      public List<Map<?,?>> getRewardsByPlaytime()
      The list of play-time reward definitions.
      Returns:
      list of reward maps, never null
    • isRegionStorageEnabled

      public boolean isRegionStorageEnabled()
      Whether the region barrel-storage feature is enabled.
      Returns:
      true if enabled, defaults to false
    • getRegionStorageSize

      public int getRegionStorageSize()
      The storage barrel size (valid Bukkit inventory sizes).
      Returns:
      storage size, clamped to a valid Bukkit size, defaults to 27
    • isRentingEnabled

      public boolean isRentingEnabled()
      Whether the region renting system is enabled.
      Returns:
      true if enabled, defaults to false
    • getDefaultRentPrice

      public double getDefaultRentPrice()
      The default rent price per chunk.
      Returns:
      default price, defaults to 1500.0
    • getMinRentPrice

      public double getMinRentPrice()
      The minimum allowed rent price per chunk.
      Returns:
      minimum price, defaults to 500.0
    • getMaxRentPrice

      public double getMaxRentPrice()
      The maximum allowed rent price per chunk.
      Returns:
      maximum price, defaults to 10_000_000.0
    • getDefaultRentDays

      public int getDefaultRentDays()
      The default rent duration in days.
      Returns:
      default days, defaults to 7
    • getMinRentDays

      public int getMinRentDays()
      The minimum allowed rent duration in days.
      Returns:
      minimum days, defaults to 1
    • getMaxRentDays

      public int getMaxRentDays()
      The maximum allowed rent duration in days.
      Returns:
      maximum days, defaults to 84
    • getDefaultSecurityDeposit

      public double getDefaultSecurityDeposit()
      The default security deposit amount.
      Returns:
      default deposit, defaults to 500.0
    • getMinSecurityDeposit

      public double getMinSecurityDeposit()
      The minimum allowed security deposit.
      Returns:
      minimum deposit, defaults to 0.0
    • getMaxSecurityDeposit

      public double getMaxSecurityDeposit()
      The maximum allowed security deposit.
      Returns:
      maximum deposit, defaults to 100_000.0
    • getNoticeToVacateDays

      public int getNoticeToVacateDays()
      The number of days' notice required before vacating a rented region.
      Returns:
      notice days, defaults to 3
    • isTaxesEnabled

      public boolean isTaxesEnabled()
      Whether the member-tax system is enabled.
      Returns:
      true if enabled, defaults to false
    • getMinTax

      public double getMinTax()
      The minimum allowed member tax rate.
      Returns:
      minimum tax, defaults to 0.0
    • getMaxTax

      public double getMaxTax()
      The maximum allowed member tax rate.
      Returns:
      maximum tax, defaults to 0.0
    • getTaxTimer

      public int getTaxTimer()
      The interval (in minutes) between tax collection ticks.
      Returns:
      tax timer in minutes, defaults to 0
    • isUpkeepEnabled

      public boolean isUpkeepEnabled()
      Whether the upkeep (region-cost) system is enabled.
      Returns:
      true if enabled, defaults to false
    • getUpkeepTimer

      public int getUpkeepTimer()
      The interval (in minutes) between upkeep ticks.
      Returns:
      upkeep timer in minutes, defaults to 0
    • getUpkeepPerChunk

      public double getUpkeepPerChunk()
      The upkeep cost charged per claimed chunk.
      Returns:
      per-chunk cost, defaults to 0.0
    • getStartUpkeep

      public int getStartUpkeep()
      The delay (in minutes) before the first upkeep charge after a region is created.
      Returns:
      start-upkeep delay in minutes, defaults to 0
    • isWarsEnabled

      public boolean isWarsEnabled()
      Whether the war system is enabled.
      Returns:
      true if enabled, defaults to false
    • getMinWarPrize

      public double getMinWarPrize()
      The minimum war prize amount.
      Returns:
      minimum prize, defaults to 0.0
    • getMaxWarPrize

      public double getMaxWarPrize()
      The maximum war prize amount.
      Returns:
      maximum prize, defaults to 0.0
    • isWarKeepInventory

      public boolean isWarKeepInventory()
      Whether winners keep their inventory on death during a war.
      Returns:
      true to keep inventory, defaults to false
    • isWarGiveHead

      public boolean isWarGiveHead()
      Whether the winning player receives a player head on kill during a war.
      Returns:
      true to give heads, defaults to false
    • getWarBroadcastType

      public String getWarBroadcastType()
      The broadcast delivery type for war events (e.g. "chat").
      Returns:
      broadcast type string
    • getOverriddenFlagsDuringWar

      public List<String> getOverriddenFlagsDuringWar()
      List of player flags that will be set to Allow during a war.
      Returns:
      list of player flags
    • isOwnershipWarsEnabled

      public boolean isOwnershipWarsEnabled()
      Whether ownership wager wars are enabled.
      Returns:
      true if enabled, defaults to true
    • getDefaultOwnershipKillsToWin

      public int getDefaultOwnershipKillsToWin()
      The default number of kills needed to win an ownership war.
      Returns:
      default kills to win, defaults to 10
    • getDefaultOwnershipTimeoutMinutes

      public int getDefaultOwnershipTimeoutMinutes()
      The default timeout in minutes for ownership wars.
      Returns:
      default timeout minutes, defaults to 60
    • isDelayedTeleportEnabled

      public boolean isDelayedTeleportEnabled()
      Whether the delayed-teleport system is enabled.
      Returns:
      true if enabled, defaults to false
    • isDelayedTeleportCancelOnMove

      public boolean isDelayedTeleportCancelOnMove()
      Whether the teleport countdown should be cancelled when the player moves.
      Returns:
      true to cancel on move, defaults to false
    • isDelayedTeleportIgnoreOperators

      public boolean isDelayedTeleportIgnoreOperators()
      Whether operators bypass the delayed-teleport system.
      Returns:
      true to bypass for ops, defaults to false
    • getDelayedTeleportDelay

      public int getDelayedTeleportDelay()
      The delay (in seconds) before the teleport completes.
      Returns:
      delay in seconds, defaults to 0
    • isDelayedTeleportBossBarEnabled

      public boolean isDelayedTeleportBossBarEnabled()
      Whether the boss-bar countdown is shown during delayed teleport.
      Returns:
      true if the boss bar is enabled, defaults to true
    • getDelayedTeleportPrice

      public double getDelayedTeleportPrice()
      The price charged for using a delayed teleport.
      Returns:
      teleport price, defaults to 0.0
    • getSelectionToolMessage

      public String getSelectionToolMessage(String path)
      A message template for the selection tool.
      Parameters:
      path - the message sub-path (e.g. "selected-chunk")
      Returns:
      the message text
    • getSelectionToolItemName

      public String getSelectionToolItemName()
      The display name of the selection tool item.
      Returns:
      item name
    • getSelectionToolItemLore

      public List<String> getSelectionToolItemLore()
      The lore lines of the selection tool item.
      Returns:
      lore lines, never null
    • getSelectionToolItemType

      public String getSelectionToolItemType()
      The material type of the selection tool item.
      Returns:
      material name
    • isCooldownIgnoreOperators

      public boolean isCooldownIgnoreOperators(String key)
      Whether operators bypass a specific cooldown.
      Parameters:
      key - the cooldown identifier
      Returns:
      true to bypass for ops, defaults to true
    • getCooldownValue

      public int getCooldownValue(String key)
      The duration (in seconds) of a specific cooldown.
      Parameters:
      key - the cooldown identifier
      Returns:
      cooldown seconds, defaults to 0
    • isLogPrivateChat

      public boolean isLogPrivateChat()
      Whether private-chat messages are logged to console.
      Returns:
      true if logging is enabled, defaults to false
    • isAutoSetTargetRegion

      public boolean isAutoSetTargetRegion()
      Whether the target-region session should be automatically set when a player enters a region.
      Returns:
      true if auto-set is enabled, defaults to false
    • getDisabledWorldsExact

      public List<String> getDisabledWorldsExact()
      The list of world names that are completely excluded from region actions.
      Returns:
      disabled world names, never null
    • getDisabledWorldsPattern

      public List<String> getDisabledWorldsPattern()
      The list of regex patterns matching world names excluded from region actions.
      Returns:
      disabled world patterns, never null