Search in sources :

Example 16 with ConfigurationManager

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

the class DeathEffectsExpansion method onLoad.

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

Example 17 with ConfigurationManager

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

the class DeathEffectsExpansion method reloadConfig.

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

Example 18 with ConfigurationManager

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

the class MythicMobsExpansion method reloadConfig.

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

Example 19 with ConfigurationManager

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

the class ListenerPreciousStones method beforeFieldCreation.

@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void beforeFieldCreation(FieldPreCreationEvent e) {
    Player player = e.getPlayer();
    if (!isInCombat(player))
        return;
    ConfigurationManager configurationManager = getExpansionConfigurationManager();
    YamlConfiguration configuration = configurationManager.get("config.yml");
    if (!configuration.getBoolean("prevent-field-creation"))
        return;
    e.setCancelled(true);
    LanguageManager languageManager = getLanguageManager();
    languageManager.sendMessage(player, "expansion.region-protection.preciousstones.prevent-field-creation", null, true);
}
Also used : Player(org.bukkit.entity.Player) LanguageManager(com.github.sirblobman.api.language.LanguageManager) YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager) EventHandler(org.bukkit.event.EventHandler)

Example 20 with ConfigurationManager

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

the class ListenerHuskSync method onPunish.

@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPunish(PlayerPunishEvent event) {
    ConfigurationManager configurationManager = getPluginConfigurationManager();
    YamlConfiguration configuration = configurationManager.get("punish.yml");
    String killOptionString = configuration.getString("kill-time");
    if (!(killOptionString == null || killOptionString.equals("QUIT"))) {
        return;
    }
    UUID playerId = event.getPlayer().getUniqueId();
    this.punishedPlayers.add(playerId);
}
Also used : YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) UUID(java.util.UUID) ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager) EventHandler(org.bukkit.event.EventHandler)

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