Class LevelsFile
java.lang.Object
me.tayebyassine.homestead.resources.ResourceFile
me.tayebyassine.homestead.resources.files.LevelsFile
Typed accessor for
levels.yml.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetKillXpMax(String entityType) The maximum XP awarded for killing a specific entity type.intgetKillXpMin(String entityType) The minimum XP awarded for killing a specific entity type.intgetRewardChunks(int level) The chunk-reward bonus for reaching a specific level.intgetRewardMembers(int level) The member-reward bonus for reaching a specific level.intgetRewardSubAreas(int level) The sub-area-reward bonus for reaching a specific level.intgetRewardUpkeepReduction(int level) The upkeep-reduction percentage for reaching a specific level.intThe timeout (in minutes) between level-up reward notifications.booleanWhether the region leveling system is enabled.Methods inherited from class ResourceFile
getBoolean, getBoolean, getConfig, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getIntegerList, getKeysUnderPath, getLong, getLong, getRaw, getString, getString, getStringList
-
Constructor Details
-
LevelsFile
- Throws:
FileNotFoundException
-
-
Method Details
-
isEnabled
public boolean isEnabled()Whether the region leveling system is enabled.- Returns:
trueif leveling is active, defaults tofalse
-
getTimeout
public int getTimeout()The timeout (in minutes) between level-up reward notifications.- Returns:
- timeout in minutes, defaults to
0(no cooldown)
-
getKillXpMin
The minimum XP awarded for killing a specific entity type.- Parameters:
entityType- the Bukkit entity type name- Returns:
- minimum XP, defaults to
0
-
getKillXpMax
The maximum XP awarded for killing a specific entity type.- Parameters:
entityType- the Bukkit entity type name- Returns:
- maximum XP, defaults to the min value if only one entry exists
-
getRewardChunks
public int getRewardChunks(int level) The chunk-reward bonus for reaching a specific level.- Parameters:
level- the region level- Returns:
- bonus chunks, defaults to
0
-
getRewardMembers
public int getRewardMembers(int level) The member-reward bonus for reaching a specific level.- Parameters:
level- the region level- Returns:
- bonus members, defaults to
0
-
getRewardSubAreas
public int getRewardSubAreas(int level) The sub-area-reward bonus for reaching a specific level.- Parameters:
level- the region level- Returns:
- bonus sub-areas, defaults to
0
-
getRewardUpkeepReduction
public int getRewardUpkeepReduction(int level) The upkeep-reduction percentage for reaching a specific level.- Parameters:
level- the region level- Returns:
- upkeep-reduction percentage, defaults to
0
-