Skip to content

Commit

Permalink
Update FileUpdater.java
Browse files Browse the repository at this point in the history
  • Loading branch information
iXanadu13 authored Aug 26, 2023
1 parent af4a162 commit 113c76c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/pers/xanadu/enderdragon/config/FileUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ public static void update() throws IOException {
File new_data_file = new File(plugin.getDataFolder(),"new/data.yml");
FileConfiguration new_data = YamlConfiguration.loadConfiguration(new_data_file);
String next_time = new_data.getString("auto_respawn.next_respawn_time");
new_data.set("version","2.2.0");
if(next_time!=null && respawn_world_name!=null){
new_data.set("version","2.2.0");
new_data.set("auto_respawn.task1.world_name",respawn_world_name);
new_data.set("auto_respawn.task1.next_respawn_time",next_time);
new_data.save(new_data_file);
}
new_data.save(new_data_file);
}
else Lang.error("The version of data.yml is not supported!");
Lang.info("New config files are generated in plugins/EnderDragon/new.");
Expand Down

0 comments on commit 113c76c

Please sign in to comment.