use of org.bukkit.craftbukkit.libs.jline.internal.InputStreamReader in project EliteMobs by MagmaGuy.
the class CustomConfigLoader method reloadCustomConfig.
public void reloadCustomConfig(String configName) {
if (customConfigFile == null) {
customConfigFile = new File(plugin.getDataFolder(), configName);
}
customConfig = YamlConfiguration.loadConfiguration(customConfigFile);
// Look for defaults in the jar
Reader defConfigStream = null;
try {
defConfigStream = new InputStreamReader(plugin.getResource(configName), "UTF8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
if (defConfigStream != null) {
YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(customConfigFile);
customConfig.setDefaults(defConfig);
}
}
Aggregations