Add version key to config pack.

This commit is contained in:
dfsek
2020-12-04 21:09:35 -07:00
parent 601eb3e7ff
commit 3d12af6b21
3 changed files with 10 additions and 2 deletions

View File

@@ -116,7 +116,7 @@ public class ConfigPack {
load(new FolderLoader(folder.toPath()));
LangUtil.log("config-pack.loaded", Level.INFO, template.getID(), String.valueOf((System.nanoTime() - l) / 1000000D), template.getAuthor());
LangUtil.log("config-pack.loaded", Level.INFO, template.getID(), String.valueOf((System.nanoTime() - l) / 1000000D), template.getAuthor(), template.getVersion());
}
public ConfigPack(ZipFile file) throws ConfigException {

View File

@@ -93,6 +93,14 @@ public class ConfigPackTemplate implements ConfigTemplate {
@Default
private boolean disableSaplings = false;
@Value("version")
@Default
private String version = "0.1.0";
public String getVersion() {
return version;
}
public boolean isDisableSaplings() {
return disableSaplings;
}

View File

@@ -93,7 +93,7 @@ world-config:
error: "Unable to load configuration for world %s"
done: "World load for world \"%1$s\" complete. Time elapsed: %2$sms"
config-pack:
loaded: "config %1$s by %3$s loaded in %2$sms."
loaded: "Config pack %1$s v%4$s by %3$s loaded in %2$sms."
config:
loaded: "Loaded %1$s from file %2$s"
loaded-all: "Loaded %1$s %2$s(s) in %3$sms."