Class QuestAmountSetting
java.lang.Object
com.ordwen.odailyquests.configuration.essentials.QuestAmountSetting
Represents the amount of quests assigned for a category.
The amount can either be a fixed integer defined in the configuration or a PlaceholderAPI expression evaluated per player.
-
Method Summary
Modifier and TypeMethodDescriptionstatic QuestAmountSettingCreates aQuestAmountSettingfrom the raw configuration value.Returns the static amount, if defined.booleanIndicates whether the amount relies on PlaceholderAPI.intresolve(org.bukkit.entity.Player player) Resolves the configured value for a player.
-
Method Details
-
from
Creates aQuestAmountSettingfrom the raw configuration value.- Parameters:
categoryName- the related categoryrawValue- the raw configuration value- Returns:
- a parsed
QuestAmountSetting
-
resolve
public int resolve(org.bukkit.entity.Player player) Resolves the configured value for a player.If the value is static, it is returned immediately. Otherwise, the placeholder expression is evaluated for the provided player.
- Parameters:
player- the player context- Returns:
- the resolved amount (never negative)
-
isDynamic
public boolean isDynamic()Indicates whether the amount relies on PlaceholderAPI.- Returns:
trueif the value is dynamic
-
getStaticAmount
Returns the static amount, if defined.- Returns:
- the configured static amount or
null
-