Add a config property for update check
This commit is contained in:
parent
ebdf3868f1
commit
83298c9b94
1 changed files with 6 additions and 2 deletions
|
@ -168,8 +168,6 @@ public class BuildCraftCore {
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void loadConfiguration(FMLPreInitializationEvent evt) {
|
public void loadConfiguration(FMLPreInitializationEvent evt) {
|
||||||
|
|
||||||
Version.check();
|
|
||||||
|
|
||||||
bcLog.setParent(FMLLog.getLogger());
|
bcLog.setParent(FMLLog.getLogger());
|
||||||
bcLog.info("Starting BuildCraft " + Version.getVersion());
|
bcLog.info("Starting BuildCraft " + Version.getVersion());
|
||||||
bcLog.info("Copyright (c) SpaceToad, 2011");
|
bcLog.info("Copyright (c) SpaceToad, 2011");
|
||||||
|
@ -178,6 +176,12 @@ public class BuildCraftCore {
|
||||||
mainConfiguration = new BuildCraftConfiguration(new File(evt.getModConfigurationDirectory(), "buildcraft/main.conf"));
|
mainConfiguration = new BuildCraftConfiguration(new File(evt.getModConfigurationDirectory(), "buildcraft/main.conf"));
|
||||||
try {
|
try {
|
||||||
mainConfiguration.load();
|
mainConfiguration.load();
|
||||||
|
|
||||||
|
Property updateCheck = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "update.check", true);
|
||||||
|
updateCheck.comment = "set to true for version check on startup";
|
||||||
|
if (updateCheck.getBoolean(true)) {
|
||||||
|
Version.check();
|
||||||
|
}
|
||||||
|
|
||||||
Property continuousCurrent = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "current.continuous",
|
Property continuousCurrent = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "current.continuous",
|
||||||
DefaultProps.CURRENT_CONTINUOUS);
|
DefaultProps.CURRENT_CONTINUOUS);
|
||||||
|
|
Loading…
Reference in a new issue