Class RegionsFile
java.lang.Object
me.tayebyassine.homestead.resources.ResourceFile
me.tayebyassine.homestead.resources.files.RegionsFile
Typed accessor for
regions.yml.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe block type used for chunk borders.doubleThe price charged per claimed chunk.intgetCooldownValue(String key) The duration (in seconds) of a specific cooldown.intThe default number of kills needed to win an ownership war.intThe default timeout in minutes for ownership wars.intThe default rent duration in days.doubleThe default rent price per chunk.doubleThe default security deposit amount.intThe delay (in seconds) before the teleport completes.doubleThe price charged for using a delayed teleport.The list of world names that are completely excluded from region actions.The list of regex patterns matching world names excluded from region actions.org.bukkit.ColorThe RGB colour list for a specific dust-colour type.floatThe particle dust size for border visualisation.The message delivery type (e.g.intThe maximum allowed rent duration in days.doubleThe maximum allowed rent price per chunk.doubleThe maximum allowed security deposit.doubleThe maximum allowed member tax rate.doubleThe maximum war prize amount.intThe minimum allowed rent duration in days.doubleThe minimum allowed rent price per chunk.doubleThe minimum allowed security deposit.doubleThe minimum allowed member tax rate.doubleThe minimum war prize amount.intThe number of days' notice required before vacating a rented region.List of player flags that will be set to Allow during a war.The action-bar message shown when a player enters a region.The chat message shown when a player enters a region.The title lines shown when a player enters a region.The action-bar message shown when a player exits a region.The chat message shown when a player exits a region.The title lines shown when a player exits a region.intThe storage barrel size (valid Bukkit inventory sizes).intThe chunk bonus awarded per trusted member.The list of play-time reward definitions.intThe sub-area bonus awarded per trusted member.The lore lines of the selection tool item.The display name of the selection tool item.The material type of the selection tool item.A message template for the selection tool.intThe delay (in minutes) before the first upkeep charge after a region is created.intThe interval (in minutes) between tax collection ticks.doubleThe upkeep cost charged per claimed chunk.intThe interval (in minutes) between upkeep ticks.The broadcast delivery type for war events (e.g.The welcome message sent to players on join.booleanWhether the adjacent-chunks rule is enabled (auto-claim neighbours).booleanWhether the target-region session should be automatically set when a player enters a region.booleanWhether the chunk-border visualisation is enabled.booleanWhether invalid data should be cleaned up on startup.booleanWhether operators bypass a specific cooldown.booleanWhether the boss-bar countdown is shown during delayed teleport.booleanWhether the teleport countdown should be cancelled when the player moves.booleanWhether the delayed-teleport system is enabled.booleanWhether operators bypass the delayed-teleport system.booleanWhether enter/exit region messages are enabled.booleanWhether the instant trust-acceptance system is enabled.booleanWhether private-chat messages are logged to console.booleanWhether ownership wager wars are enabled.booleanWhether region protection should be ignored for actions in disabled worlds.booleanWhether the region barrel-storage feature is enabled.booleanWhether the region renting system is enabled.booleanWhether the member-reward system is enabled.booleanWhether the sub-area system is enabled.booleanWhether the member-tax system is enabled.booleanWhether TNT should only explode below sea level inside regions.booleanWhether the upkeep (region-cost) system is enabled.booleanWhether the winning player receives a player head on kill during a war.booleanWhether winners keep their inventory on death during a war.booleanWhether the war system is enabled.booleanWhether the join welcome message is enabled.booleanWhether the welcome-sign feature is enabled.booleanWhether players should be teleported back to region spawn when entering the End exit portal.Methods inherited from class ResourceFile
getBoolean, getBoolean, getConfig, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getIntegerList, getKeysUnderPath, getLong, getLong, getRaw, getString, getString, getStringList
-
Constructor Details
-
RegionsFile
- Throws:
FileNotFoundException
-
-
Method Details
-
isCleanStartupEnabled
public boolean isCleanStartupEnabled()Whether invalid data should be cleaned up on startup.- Returns:
trueif clean-startup is enabled, defaults totrue
-
isInstantTrustSystemEnabled
public boolean isInstantTrustSystemEnabled()Whether the instant trust-acceptance system is enabled.- Returns:
trueif trust acceptance is skipped, defaults tofalse
-
teleportPlayersBackToTegionSpawnWhenEnteringEndExitPortal
public boolean teleportPlayersBackToTegionSpawnWhenEnteringEndExitPortal()Whether players should be teleported back to region spawn when entering the End exit portal.- Returns:
trueif teleportation is active, defaults tofalse
-
isRegionProtectionDisabledInDisabledWorlds
public boolean isRegionProtectionDisabledInDisabledWorlds()Whether region protection should be ignored for actions in disabled worlds.- Returns:
trueto bypass protection, defaults tofalse
-
isTntRestrictedToBelowSeaLevel
public boolean isTntRestrictedToBelowSeaLevel()Whether TNT should only explode below sea level inside regions.- Returns:
trueto restrict TNT, defaults tofalse
-
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:
trueif enabled, defaults tofalse
-
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:
trueif enabled, defaults tofalse
-
isEnterExitRegionMessageEnabled
public boolean isEnterExitRegionMessageEnabled()Whether enter/exit region messages are enabled.- Returns:
trueif enabled, defaults tofalse
-
getEnterExitRegionMessageType
The message delivery type (e.g."chat","title","actionbar").- Returns:
- the message type string
-
getRegionEnterTitle
-
getRegionEnterActionbar
The action-bar message shown when a player enters a region.- Returns:
- action-bar text
-
getRegionEnterChat
The chat message shown when a player enters a region.- Returns:
- chat message text
-
getRegionExitTitle
-
getRegionExitActionbar
The action-bar message shown when a player exits a region.- Returns:
- action-bar text
-
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:
trueif borders are active, defaults tofalse
-
getBordersBlockType
The block type used for chunk borders.- Returns:
- the material name string
-
getDustColor
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:
trueif enabled, defaults tofalse
-
isSubAreasEnabled
public boolean isSubAreasEnabled()Whether the sub-area system is enabled.- Returns:
trueif enabled, defaults tofalse
-
isRewardsEnabled
public boolean isRewardsEnabled()Whether the member-reward system is enabled.- Returns:
trueif enabled, defaults tofalse
-
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
-
isRegionStorageEnabled
public boolean isRegionStorageEnabled()Whether the region barrel-storage feature is enabled.- Returns:
trueif enabled, defaults tofalse
-
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:
trueif enabled, defaults tofalse
-
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:
trueif enabled, defaults tofalse
-
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:
trueif enabled, defaults tofalse
-
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:
trueif enabled, defaults tofalse
-
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:
trueto keep inventory, defaults tofalse
-
isWarGiveHead
public boolean isWarGiveHead()Whether the winning player receives a player head on kill during a war.- Returns:
trueto give heads, defaults tofalse
-
getWarBroadcastType
The broadcast delivery type for war events (e.g."chat").- Returns:
- broadcast type string
-
getOverriddenFlagsDuringWar
-
isOwnershipWarsEnabled
public boolean isOwnershipWarsEnabled()Whether ownership wager wars are enabled.- Returns:
trueif enabled, defaults totrue
-
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:
trueif enabled, defaults tofalse
-
isDelayedTeleportCancelOnMove
public boolean isDelayedTeleportCancelOnMove()Whether the teleport countdown should be cancelled when the player moves.- Returns:
trueto cancel on move, defaults tofalse
-
isDelayedTeleportIgnoreOperators
public boolean isDelayedTeleportIgnoreOperators()Whether operators bypass the delayed-teleport system.- Returns:
trueto bypass for ops, defaults tofalse
-
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:
trueif the boss bar is enabled, defaults totrue
-
getDelayedTeleportPrice
public double getDelayedTeleportPrice()The price charged for using a delayed teleport.- Returns:
- teleport price, defaults to
0.0
-
getSelectionToolMessage
-
getSelectionToolItemName
The display name of the selection tool item.- Returns:
- item name
-
getSelectionToolItemLore
-
getSelectionToolItemType
The material type of the selection tool item.- Returns:
- material name
-
isCooldownIgnoreOperators
Whether operators bypass a specific cooldown.- Parameters:
key- the cooldown identifier- Returns:
trueto bypass for ops, defaults totrue
-
getCooldownValue
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:
trueif logging is enabled, defaults tofalse
-
isAutoSetTargetRegion
public boolean isAutoSetTargetRegion()Whether the target-region session should be automatically set when a player enters a region.- Returns:
trueif auto-set is enabled, defaults tofalse
-
getDisabledWorldsExact
-
getDisabledWorldsPattern
-