private boolean checkCopyConfig() throws IOException {
File file = new File(getDataFolder(), CONFIG_FILE_NAME);
if (file.exists()) {
Configuration config = YamlConfiguration.loadConfiguration(file);
int version = config.getInt("config-version");
if (version < BungeemodeConfig.CURRENT_CONFIG_VERSION) {
Path dataFolderPath = getDataFolder().toPath();
Files.move(file.toPath(), dataFolderPath.resolve("config_old.yml"), StandardCopyOption.REPLACE_EXISTING);
return true;
}
} else {
return true;
}
return false;
}
BungeemodeAddon.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:HeavySpleef
作者:
评论列表
文章目录