Add a config property for update check

This commit is contained in:
Sergey Shatunov 2013-09-23 22:21:24 +08:00
parent ebdf3868f1
commit 83298c9b94
No known key found for this signature in database
GPG key ID: 65ED608D16C3892A

View file

@ -168,8 +168,6 @@ public class BuildCraftCore {
@EventHandler
public void loadConfiguration(FMLPreInitializationEvent evt) {
Version.check();
bcLog.setParent(FMLLog.getLogger());
bcLog.info("Starting BuildCraft " + Version.getVersion());
bcLog.info("Copyright (c) SpaceToad, 2011");
@ -179,6 +177,12 @@ public class BuildCraftCore {
try {
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",
DefaultProps.CURRENT_CONTINUOUS);
continuousCurrent.comment = "set to true for allowing machines to be driven by continuous current";