Search in sources :

Example 31 with ConfigurationManager

use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.

the class CustomScoreboardManager method isGlobalEnabled.

private boolean isGlobalEnabled() {
    ScoreboardExpansion expansion = getExpansion();
    ConfigurationManager configurationManager = expansion.getConfigurationManager();
    YamlConfiguration configuration = configurationManager.get("config.yml");
    return configuration.getBoolean("enabled", true);
}
Also used : YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) ScoreboardExpansion(combatlogx.expansion.scoreboard.ScoreboardExpansion) ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager)

Example 32 with ConfigurationManager

use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.

the class CombatPlugin method saveConfig.

@Override
public void saveConfig(String fileName) {
    ConfigurationManager configurationManager = getConfigurationManager();
    configurationManager.save(fileName);
}
Also used : ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager)

Example 33 with ConfigurationManager

use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.

the class CombatPlugin method reloadConfig.

@Override
public void reloadConfig(String fileName) {
    ConfigurationManager configurationManager = getConfigurationManager();
    configurationManager.reload(fileName);
}
Also used : ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager)

Example 34 with ConfigurationManager

use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.

the class CombatPlugin method broadcastEnableMessage.

private void broadcastEnableMessage() {
    ConfigurationManager configurationManager = getConfigurationManager();
    YamlConfiguration configuration = configurationManager.get("config.yml");
    if (!configuration.getBoolean("broadcast.on-enable")) {
        return;
    }
    LanguageManager languageManager = getLanguageManager();
    languageManager.broadcastMessage("broadcast.on-enable", null, true);
}
Also used : LanguageManager(com.github.sirblobman.api.language.LanguageManager) YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager)

Example 35 with ConfigurationManager

use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.

the class ListenerConfiguration method checkDeathUntag.

private void checkDeathUntag(Player player) {
    ConfigurationManager configurationManager = getPluginConfigurationManager();
    YamlConfiguration configuration = configurationManager.get("config.yml");
    if (!configuration.getBoolean("untag-on-death"))
        return;
    ICombatManager combatManager = getCombatManager();
    if (combatManager.isInCombat(player)) {
        combatManager.untag(player, UntagReason.SELF_DEATH);
    }
}
Also used : ICombatManager(com.github.sirblobman.combatlogx.api.manager.ICombatManager) YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager)

Aggregations

ConfigurationManager (com.github.sirblobman.api.configuration.ConfigurationManager)117 YamlConfiguration (org.bukkit.configuration.file.YamlConfiguration)62 Expansion (com.github.sirblobman.combatlogx.api.expansion.Expansion)20 ICombatLogX (com.github.sirblobman.combatlogx.api.ICombatLogX)10 PlayerDataManager (com.github.sirblobman.api.configuration.PlayerDataManager)6 LanguageManager (com.github.sirblobman.api.language.LanguageManager)6 Player (org.bukkit.entity.Player)6 EventHandler (org.bukkit.event.EventHandler)6 ICombatManager (com.github.sirblobman.combatlogx.api.manager.ICombatManager)5 Entity (org.bukkit.entity.Entity)4 LoggerExpansion (combatlogx.expansion.logger.LoggerExpansion)3 LivingEntity (org.bukkit.entity.LivingEntity)3 PluginManager (org.bukkit.plugin.PluginManager)3 ExpansionManager (com.github.sirblobman.combatlogx.api.expansion.ExpansionManager)2 IDeathListener (com.github.sirblobman.combatlogx.api.listener.IDeathListener)2 MobTaggerExpansion (combatlogx.expansion.mob.tagger.MobTaggerExpansion)2 ScoreboardExpansion (combatlogx.expansion.scoreboard.ScoreboardExpansion)2 SimpleDateFormat (java.text.SimpleDateFormat)2 Date (java.util.Date)2 UUID (java.util.UUID)2