[Feature] Update Checker

This commit is contained in:
Frank 2022-07-22 00:17:25 +02:00
parent 2ef9e51ef1
commit 69d472d107
21 changed files with 633 additions and 22 deletions

View file

@ -18,6 +18,22 @@ public class MainConfig extends NamedPathConfig {
APPLY_PATCHES)
);
@ConfigUI(hide = true)
public static final ConfigToken<Boolean> DID_SHOW_WELCOME = ConfigToken.Boolean(
false,
"did_show_welcome",
"version"
);
public static final ConfigToken<Boolean> CHECK_VERSIONS = DependendConfigToken.Boolean(
true,
"check",
"version",
(config) -> !config.get(DID_SHOW_WELCOME)
);
public MainConfig() {
super(BCLib.MOD_ID, "main", true, true);
}
@ -29,4 +45,21 @@ public class MainConfig extends NamedPathConfig {
public boolean repairBiomes() {
return get(REPAIR_BIOMES);
}
public boolean checkVersions() {
return get(CHECK_VERSIONS);
}
public boolean didShowWelcomeScreen() {
return get(DID_SHOW_WELCOME);
}
public void setDidShowWelcomeScreen() {
set(DID_SHOW_WELCOME, true);
}
public void setCheckVersions(boolean newValue) {
set(CHECK_VERSIONS, newValue);
}
}