Set latestModVersion to true by default so the user doesn't get an update notification if their internet failed

If in a dev environment, ApiClient#isVersionUpToDate always returns true
This commit is contained in:
CrushedPixel
2015-07-15 14:44:53 +02:00
parent 7fd429e25f
commit 13314e27da
2 changed files with 3 additions and 1 deletions

View File

@@ -92,7 +92,7 @@ public class ReplayMod {
public static CrosshairRenderHandler crosshairRenderHandler;
@Getter
private static boolean latestModVersion = false;
private static boolean latestModVersion = true;
// The instance of your mod that Forge uses.
@Instance(value = "ReplayModID")

View File

@@ -203,6 +203,8 @@ public class ApiClient {
}
public boolean isVersionUpToDate(String versionIdentifier) throws IOException, ApiException {
//in a development environment, getContainer().getVersion() will return ${version}
if(versionIdentifier.equals("${version}")) return true;
QueryBuilder builder = new QueryBuilder(ReplayModApiMethods.up_to_date);
builder.put("version", versionIdentifier);
return invokeAndReturn(builder, Success.class).isSuccess();