use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class ListenerLogger method getLoggerFormat.
private String getLoggerFormat(String path) {
Expansion expansion = getExpansion();
ConfigurationManager configurationManager = expansion.getConfigurationManager();
YamlConfiguration configuration = configurationManager.get("config.yml");
String prefixFormat = configuration.getString("log-entry-options.prefix-format");
if (prefixFormat == null)
prefixFormat = "[MMMM dd, YYYY HH:mm:ss.SSSa zzz] ";
SimpleDateFormat format = new SimpleDateFormat(prefixFormat);
String prefix = format.format(new Date(System.currentTimeMillis()));
String messageFormat = configuration.getString("log-entry-options." + path);
if (messageFormat == null)
messageFormat = "";
return (prefix + messageFormat);
}
use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class LootProtectionExpansion method reloadConfig.
@Override
public void reloadConfig() {
ConfigurationManager configurationManager = getConfigurationManager();
configurationManager.reload("config.yml");
}
use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class LootProtectionExpansion 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 DamageTaggerExpansion 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 isDisabled.
private boolean isDisabled(DamageCause damageCause) {
Expansion expansion = getExpansion();
ConfigurationManager configurationManager = expansion.getConfigurationManager();
YamlConfiguration configuration = configurationManager.get("config.yml");
if (configuration.getBoolean("all-damage"))
return false;
String damageCauseName = damageCause.name().toLowerCase();
return !configuration.getBoolean("damage-type." + damageCauseName);
}
Aggregations