From 83298c9b944f4e4b3e323340119dc7a718c204d8 Mon Sep 17 00:00:00 2001 From: Sergey Shatunov Date: Mon, 23 Sep 2013 22:21:24 +0800 Subject: [PATCH] Add a config property for update check --- common/buildcraft/BuildCraftCore.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index 5d8e1da4..bff23b3a 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -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"); @@ -178,6 +176,12 @@ public class BuildCraftCore { mainConfiguration = new BuildCraftConfiguration(new File(evt.getModConfigurationDirectory(), "buildcraft/main.conf")); 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);