use of net.md_5.bungee.config.ConfigurationProvider in project ChangeSkin by games647.
the class ChangeSkinCore method loadFile.
private Configuration loadFile(String fileName) throws IOException {
Configuration defaults;
ConfigurationProvider configProvider = ConfigurationProvider.getProvider(YamlConfiguration.class);
try (InputStream defaultStream = getClass().getClassLoader().getResourceAsStream(fileName)) {
defaults = configProvider.load(defaultStream);
}
Path file = plugin.getPluginFolder().resolve(fileName);
try (Reader reader = Files.newBufferedReader(file)) {
return configProvider.load(reader, defaults);
}
}
Aggregations