support for custom mob names

closes #71
This commit is contained in:
hyperdefined
2024-10-07 21:05:46 -04:00
parent 7fe0234785
commit 0cf85edda6
6 changed files with 110 additions and 19 deletions

View File

@@ -37,6 +37,7 @@ package lol.hyper.toolstats.tools.config;
import lol.hyper.toolstats.ToolStats;
import lol.hyper.toolstats.tools.config.versions.Version6;
import lol.hyper.toolstats.tools.config.versions.Version7;
import lol.hyper.toolstats.tools.config.versions.Version8;
public class ConfigUpdater {
@@ -49,17 +50,22 @@ public class ConfigUpdater {
public void updateConfig() {
int version = toolStats.config.getInt("config-version");
// this will be a switch in the future
// Upgrade 5 to 6
if (version == 5) {
Version6 version6 = new Version6(toolStats);
version6.update();
}
// Upgrade 6 to 7
if (version == 6) {
Version7 version7 = new Version7(toolStats);
version7.update();
switch(version) {
case 5: {
// Version 5 to 6
Version6 version6 = new Version6(toolStats);
version6.update();
}
case 6: {
// Version 6 to 7
Version7 version7 = new Version7(toolStats);
version7.update();
}
case 7: {
// Version 7 to 8
Version8 version8 = new Version8(toolStats);
version8.update();
}
}
}
}