Search in sources :

Example 46 with ConfigurationManager

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

the class PunishManager method loadPunishments.

@Override
public void loadPunishments() {
    this.punishCommandList.clear();
    this.specialPunishmentList.clear();
    ConfigurationManager configurationManager = this.plugin.getConfigurationManager();
    YamlConfiguration configuration = configurationManager.get("commands.yml");
    List<String> punishCommandList = configuration.getStringList("punish-command-list");
    this.punishCommandList.addAll(punishCommandList);
    if (configuration.getBoolean("special-punish-commands-enabled")) {
        ConfigurationSection section = configuration.getConfigurationSection("special-punish-commands");
        loadSpecialPunishments(section);
    }
}
Also used : YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager) ConfigurationSection(org.bukkit.configuration.ConfigurationSection)

Example 47 with ConfigurationManager

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

the class CombatNpcManager method printDebug.

private void printDebug(String message) {
    ConfigurationManager pluginConfigurationManager = getCombatLogX().getConfigurationManager();
    YamlConfiguration configuration = pluginConfigurationManager.get("config.yml");
    if (!configuration.getBoolean("debug-mode"))
        return;
    Logger logger = getExpansion().getLogger();
    logger.info("[Debug] " + message);
}
Also used : YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) Logger(java.util.logging.Logger) ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager)

Example 48 with ConfigurationManager

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

the class BossBarExpansion method onLoad.

@Override
public void onLoad() {
    ConfigurationManager configurationManager = getConfigurationManager();
    configurationManager.saveDefault("config.yml");
}
Also used : ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager)

Example 49 with ConfigurationManager

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

the class BossBarUpdater method isGlobalEnabled.

private boolean isGlobalEnabled() {
    BossBarExpansion 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) ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager)

Example 50 with ConfigurationManager

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

the class CheatPreventionExpansion method reloadConfig.

@Override
public void reloadConfig() {
    ConfigurationManager configurationManager = getConfigurationManager();
    configurationManager.reload("blocks.yml");
    configurationManager.reload("buckets.yml");
    configurationManager.reload("chat.yml");
    configurationManager.reload("commands.yml");
    configurationManager.reload("config.yml");
    configurationManager.reload("entities.yml");
    configurationManager.reload("flight.yml");
    configurationManager.reload("game-mode.yml");
    configurationManager.reload("inventories.yml");
    configurationManager.reload("items.yml");
    configurationManager.reload("potions.yml");
    configurationManager.reload("teleportation.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