Skip to content

Commit 02d5d1c

Browse files
sebampuerohyperdefined
authored andcommitted
feat: adding updater for config version 11
1 parent d675549 commit 02d5d1c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/main/java/lol/hyper/toolstats/tools/config/ConfigUpdater.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ public void updateConfig() {
6262
version11.update();
6363
}
6464
}
65-
}
65+
}

src/main/java/lol/hyper/toolstats/tools/config/versions/Version11.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ public void update() {
8686
toolStats.logger.info("Adding enabled.damage-done.bow to config.yml");
8787
toolStats.logger.info("Adding enabled.damage-done.mace to config.yml");
8888

89+
toolStats.logger.info("Changing messages.flight-time to new format");
90+
toolStats.config.set("messages.flight-time", "&7Flight time: &8{years}y {months}m {days}d {hours}h {minutes}m {seconds}s");
91+
8992
// save the config and reload it
9093
try {
9194
toolStats.config.save("plugins" + File.separator + "ToolStats" + File.separator + "config.yml");
@@ -96,4 +99,4 @@ public void update() {
9699
toolStats.loadConfig();
97100
toolStats.logger.info("Config has been updated to version 11. A copy of version 10 has been saved as config-10.yml");
98101
}
99-
}
102+
}

0 commit comments

Comments
 (0)