Package stawa.vitalstrike.config
Class ConfigManager
java.lang.Object
stawa.vitalstrike.config.ConfigManager
Manages plugin configuration, loading settings from the config file.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigManager(org.bukkit.plugin.java.JavaPlugin plugin, Logger logger) Creates a new ConfigManager instance. -
Method Summary
Modifier and TypeMethodDescriptionintGets the interval in seconds between decay ticks.intGets the minimum combo value that decay will not go below.intGets the amount of combo points to lose per decay interval.intGets the time in seconds before combo decay starts.Gets the format string for the combo display in action bar.doubleGets the duration in seconds for the combo hologram.Gets the format string for the combo hologram.doubleGets the height offset for the combo hologram.intGets the minimum combo required to show a hologram.doubleGets the base multiplier value.doubleGets the maximum allowed multiplier.doubleGets the multiplier increase per combo point.longGets the time in milliseconds before a combo resets.Gets the configured damage indicator type.Gets the map of sounds for different damage types.Gets the format string for the decay warning.doubleGets the duration in seconds for general displays (like action bar).Gets the format string for the multiplier display.Gets the map of rank colors.Gets the format string for rank display.Gets the map of rank-specific multipliers.Gets the map of rank thresholds.booleanChecks if combo decay is enabled.booleanChecks if the combo system is enabled.booleanChecks if combo holograms are enabled.booleanChecks if combo multipliers are enabled.booleanChecks if combo ranks are enabled.booleanChecks if the plugin is enabled.booleanChecks if the update checker is enabled.voidreload()Reloads the configuration from the file.
-
Constructor Details
-
ConfigManager
Creates a new ConfigManager instance.- Parameters:
plugin- The plugin instancelogger- The logger to use for reporting configuration status
-
-
Method Details
-
reload
public void reload()Reloads the configuration from the file. -
isEnabled
public boolean isEnabled()Checks if the plugin is enabled.- Returns:
- true if enabled, false otherwise
-
isUpdateCheckerEnabled
public boolean isUpdateCheckerEnabled()Checks if the update checker is enabled.- Returns:
- true if enabled, false otherwise
-
isComboEnabled
public boolean isComboEnabled()Checks if the combo system is enabled.- Returns:
- true if enabled, false otherwise
-
getComboResetTime
public long getComboResetTime()Gets the time in milliseconds before a combo resets.- Returns:
- The combo reset time in milliseconds
-
isComboDecayEnabled
public boolean isComboDecayEnabled()Checks if combo decay is enabled.- Returns:
- true if enabled, false otherwise
-
getComboDecayTime
public int getComboDecayTime()Gets the time in seconds before combo decay starts.- Returns:
- The combo decay time in seconds
-
getComboDecayRate
public int getComboDecayRate()Gets the amount of combo points to lose per decay interval.- Returns:
- The combo decay rate
-
getComboDecayInterval
public int getComboDecayInterval()Gets the interval in seconds between decay ticks.- Returns:
- The combo decay interval in seconds
-
getComboDecayMinimum
public int getComboDecayMinimum()Gets the minimum combo value that decay will not go below.- Returns:
- The minimum combo value
-
isComboMultiplierEnabled
public boolean isComboMultiplierEnabled()Checks if combo multipliers are enabled.- Returns:
- true if enabled, false otherwise
-
getComboMultiplierBase
public double getComboMultiplierBase()Gets the base multiplier value.- Returns:
- The base multiplier
-
getComboMultiplierPerCombo
public double getComboMultiplierPerCombo()Gets the multiplier increase per combo point.- Returns:
- The multiplier increase per combo
-
getComboMultiplierMax
public double getComboMultiplierMax()Gets the maximum allowed multiplier.- Returns:
- The maximum multiplier
-
getRankMultipliers
Gets the map of rank-specific multipliers.- Returns:
- A map of rank names to multiplier values
-
isComboHologramEnabled
public boolean isComboHologramEnabled()Checks if combo holograms are enabled.- Returns:
- true if enabled, false otherwise
-
getComboHologramMinCombo
public int getComboHologramMinCombo()Gets the minimum combo required to show a hologram.- Returns:
- The minimum combo for hologram
-
getComboHologramDuration
public double getComboHologramDuration()Gets the duration in seconds for the combo hologram.- Returns:
- The hologram duration in seconds
-
getComboHologramFormat
Gets the format string for the combo hologram.- Returns:
- The hologram format
-
getComboHologramHeight
public double getComboHologramHeight()Gets the height offset for the combo hologram.- Returns:
- The height offset
-
getComboFormat
Gets the format string for the combo display in action bar.- Returns:
- The combo display format
-
getMultiplierFormat
Gets the format string for the multiplier display.- Returns:
- The multiplier display format
-
getDecayWarningFormat
Gets the format string for the decay warning.- Returns:
- The decay warning format
-
isComboRankEnabled
public boolean isComboRankEnabled()Checks if combo ranks are enabled.- Returns:
- true if enabled, false otherwise
-
getRankFormat
Gets the format string for rank display.- Returns:
- The rank display format
-
getRankThresholds
Gets the map of rank thresholds.- Returns:
- A map of rank names to combo thresholds
-
getRankColors
Gets the map of rank colors.- Returns:
- A map of rank names to color codes/formats
-
getDisplayDuration
public double getDisplayDuration()Gets the duration in seconds for general displays (like action bar).- Returns:
- The display duration in seconds
-
getDamageIndicatorType
Gets the configured damage indicator type.- Returns:
- The damage indicator type string
-
getDamageTypeSounds
Gets the map of sounds for different damage types.- Returns:
- A map of damage type strings to Sound objects
-