Update the ApiClient#isVersionUpToDate method to inform the server about the Minecraft Version, which is required to determine whether a newer Mod Version for the given Minecraft Version is available
This commit is contained in:
@@ -207,8 +207,13 @@ 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;
|
||||
|
||||
//get the Minecraft Version String
|
||||
String mcversion = mc.getVersion();
|
||||
|
||||
QueryBuilder builder = new QueryBuilder(ReplayModApiMethods.up_to_date);
|
||||
builder.put("version", versionIdentifier);
|
||||
builder.put("minecraft", mcversion);
|
||||
return invokeAndReturn(builder, Success.class).isSuccess();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user