feat: adding updater for config version 11

This commit is contained in:
sebampuero
2025-03-15 01:34:07 +01:00
committed by hyperdefined
parent d675549209
commit 02d5d1c17e
2 changed files with 5 additions and 2 deletions

View File

@@ -62,4 +62,4 @@ public class ConfigUpdater {
version11.update();
}
}
}
}

View File

@@ -86,6 +86,9 @@ public class Version11 {
toolStats.logger.info("Adding enabled.damage-done.bow to config.yml");
toolStats.logger.info("Adding enabled.damage-done.mace to config.yml");
toolStats.logger.info("Changing messages.flight-time to new format");
toolStats.config.set("messages.flight-time", "&7Flight time: &8{years}y {months}m {days}d {hours}h {minutes}m {seconds}s");
// save the config and reload it
try {
toolStats.config.save("plugins" + File.separator + "ToolStats" + File.separator + "config.yml");
@@ -96,4 +99,4 @@ public class Version11 {
toolStats.loadConfig();
toolStats.logger.info("Config has been updated to version 11. A copy of version 10 has been saved as config-10.yml");
}
}
}