/**
* Gets a configuration file from the jar file.
*
* @param path
* Path in the jar file.
* @return The configuration file.
*/
private Configuration getJarConfig(String path) {
InputStream resource = getResource(path);
if (resource == null) {
// Not found
return new YamlConfiguration();
}
Reader reader = new InputStreamReader(resource, Charsets.UTF_8);
Configuration config = YamlConfiguration.loadConfiguration(reader);
try {
resource.close();
} catch (IOException e) {
getLogger().log(Level.SEVERE, "Failed to close stream", e);
}
return config;
}
BlockLockerPluginImpl.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:BlockLocker
作者:
评论列表
文章目录