Search in sources :

Example 1 with TimerType

use of com.github.sirblobman.combatlogx.api.object.TimerType in project CombatLogX by SirBlobman.

the class CombatManager method getMaxTimerSeconds.

@Override
public int getMaxTimerSeconds(Player player) {
    ConfigurationManager configurationManager = this.plugin.getConfigurationManager();
    YamlConfiguration configuration = configurationManager.get("config.yml");
    String timerTypeString = configuration.getString("timer.type");
    TimerType timerType = TimerType.parse(timerTypeString);
    return (timerType == TimerType.PERMISSION ? getPermissionTimerSeconds(player) : getGlobalTimerSeconds());
}
Also used : TimerType(com.github.sirblobman.combatlogx.api.object.TimerType) YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager)

Aggregations

ConfigurationManager (com.github.sirblobman.api.configuration.ConfigurationManager)1 TimerType (com.github.sirblobman.combatlogx.api.object.TimerType)1 YamlConfiguration (org.bukkit.configuration.file.YamlConfiguration)1