use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class NewbieHelperExpansion method onLoad.
@Override
public void onLoad() {
ConfigurationManager configurationManager = getConfigurationManager();
configurationManager.saveDefault("config.yml");
}
use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class ListenerDamage method shouldRemoveProtectionOnAttack.
private boolean shouldRemoveProtectionOnAttack() {
ConfigurationManager configurationManager = getExpansionConfigurationManager();
YamlConfiguration configuration = configurationManager.get("config.yml");
return configuration.getBoolean("remove-protection-on-attack", true);
}
use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class ListenerDamage method getDamager.
private Entity getDamager(EntityDamageByEntityEvent e) {
ConfigurationManager configurationManager = getPluginConfigurationManager();
YamlConfiguration configuration = configurationManager.get("config.yml");
Entity damager = e.getDamager();
if (configuration.getBoolean("link-projectiles")) {
ICombatLogX plugin = getCombatLogX();
damager = EntityHelper.linkProjectile(plugin, damager);
}
if (configuration.getBoolean("link-pets")) {
damager = EntityHelper.linkPet(damager);
}
return damager;
}
use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class ProtectionManager method getProtectionExpireTime.
private long getProtectionExpireTime() {
ConfigurationManager configurationManager = this.expansion.getConfigurationManager();
YamlConfiguration configuration = configurationManager.get("config.yml");
long protectionMillis = configuration.getLong("protection-time");
return (System.currentTimeMillis() + protectionMillis);
}
use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class RewardExpansion method reloadConfig.
@Override
public void reloadConfig() {
ConfigurationManager configurationManager = getConfigurationManager();
configurationManager.reload("config.yml");
RewardManager rewardManager = getRewardManager();
rewardManager.loadRewards();
}
Aggregations