Search in sources :

Example 66 with ConfigurationManager

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

the class RegionHandler method getConfiguration.

private YamlConfiguration getConfiguration() {
    RegionExpansion expansion = getExpansion();
    ConfigurationManager configurationManager = expansion.getConfigurationManager();
    return configurationManager.get("config.yml");
}
Also used : ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager)

Example 67 with ConfigurationManager

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

the class CombatListener method isDebugMode.

protected final boolean isDebugMode() {
    ConfigurationManager configurationManager = getPluginConfigurationManager();
    YamlConfiguration configuration = configurationManager.get("config.yml");
    return configuration.getBoolean("debug-mode", false);
}
Also used : YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager)

Example 68 with ConfigurationManager

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

the class CombatListener method isWorldDisabled.

protected final boolean isWorldDisabled(World world) {
    ICombatLogX plugin = getCombatLogX();
    ConfigurationManager configurationManager = plugin.getConfigurationManager();
    YamlConfiguration configuration = configurationManager.get("config.yml");
    List<String> disabledWorldList = configuration.getStringList("disabled-world-list");
    boolean inverted = configuration.getBoolean("disabled-world-list-inverted");
    String worldName = world.getName();
    boolean contains = disabledWorldList.contains(worldName);
    return (inverted != contains);
}
Also used : ICombatLogX(com.github.sirblobman.combatlogx.api.ICombatLogX) YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager)

Example 69 with ConfigurationManager

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

the class CombatLogCommand method isWorldDisabled.

protected final boolean isWorldDisabled(World world) {
    ICombatLogX plugin = getCombatLogX();
    ConfigurationManager configurationManager = plugin.getConfigurationManager();
    YamlConfiguration configuration = configurationManager.get("config.yml");
    List<String> disabledWorldList = configuration.getStringList("disabled-world-list");
    boolean inverted = configuration.getBoolean("disabled-world-list-inverted");
    String worldName = world.getName();
    boolean contains = disabledWorldList.contains(worldName);
    return (inverted != contains);
}
Also used : ICombatLogX(com.github.sirblobman.combatlogx.api.ICombatLogX) YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager)

Example 70 with ConfigurationManager

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

the class ActionBarExpansion method onLoad.

@Override
public void onLoad() {
    ConfigurationManager configurationManager = getConfigurationManager();
    configurationManager.saveDefault("config.yml");
}
Also used : 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