use of com.github.sirblobman.api.configuration.ConfigurationManager 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());
}
use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class CustomScoreboardManager method shouldIgnorePrevious.
private boolean shouldIgnorePrevious() {
ScoreboardExpansion expansion = getExpansion();
ConfigurationManager configurationManager = expansion.getConfigurationManager();
YamlConfiguration configuration = configurationManager.get("config.yml");
return !configuration.getBoolean("save-previous");
}
use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class CombatPlugin method saveDefaultConfig.
@Override
public void saveDefaultConfig(String fileName) {
ConfigurationManager configurationManager = getConfigurationManager();
configurationManager.saveDefault(fileName);
}
use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class CombatPlugin method broadcastDisableMessage.
private void broadcastDisableMessage() {
ConfigurationManager configurationManager = getConfigurationManager();
YamlConfiguration configuration = configurationManager.get("config.yml");
if (!configuration.getBoolean("broadcast.on-disable")) {
return;
}
LanguageManager languageManager = getLanguageManager();
languageManager.broadcastMessage("broadcast.on-disable", null, true);
}
use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class PunishManager method increasePunishmentCount.
private void increasePunishmentCount(OfflinePlayer player) {
ConfigurationManager configurationManager = this.plugin.getConfigurationManager();
YamlConfiguration configuration = configurationManager.get("punish.yml");
if (!configuration.getBoolean("enable-punishment-counter")) {
return;
}
PlayerDataManager playerDataManager = this.plugin.getPlayerDataManager();
YamlConfiguration playerData = playerDataManager.get(player);
long currentCount = playerData.getLong("punishment-count", 0L);
playerData.set("punishment-count", currentCount + 1L);
playerDataManager.save(player);
}
Aggregations