mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-06 08:39:33 +00:00
[TASK] Set bot version to API V3
This commit is contained in:
@@ -15,7 +15,7 @@ public class Configuration {
|
|||||||
public static final String GET_SERVER_PROVIDER = "http://bdn.parabot.org/api/get.php?action=server_provider&name=";
|
public static final String GET_SERVER_PROVIDER = "http://bdn.parabot.org/api/get.php?action=server_provider&name=";
|
||||||
public static final String GET_SERVER_PROVIDER_INFO = "http://bdn.parabot.org/api/get.php?action=server_information&name=";
|
public static final String GET_SERVER_PROVIDER_INFO = "http://bdn.parabot.org/api/get.php?action=server_information&name=";
|
||||||
public static final String GET_SERVER_SETTINGS = "http://bdn.parabot.org/api/get.php?action=get_settings";
|
public static final String GET_SERVER_SETTINGS = "http://bdn.parabot.org/api/get.php?action=get_settings";
|
||||||
public static final String GET_BOT_VERSION = "http://bdn.parabot.org/api/v2/bot/version";
|
public static final String GET_BOT_VERSION = "http://v3.bdn.parabot.org/api/bot/list/client?latest=true";
|
||||||
public static final String API_DOWNLOAD_BOT = "http://bdn.parabot.org/api/v2/bot/download/client/";
|
public static final String API_DOWNLOAD_BOT = "http://bdn.parabot.org/api/v2/bot/download/client/";
|
||||||
public static final String DOWNLOAD_BOT = "http://bdn.parabot.org/versions/";
|
public static final String DOWNLOAD_BOT = "http://bdn.parabot.org/versions/";
|
||||||
public static final String REGISTRATION_PAGE = "https://www.parabot.org/community/register/";
|
public static final String REGISTRATION_PAGE = "https://www.parabot.org/community/register/";
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ public class Core {
|
|||||||
latestVersion = null;
|
latestVersion = null;
|
||||||
if (br != null) {
|
if (br != null) {
|
||||||
JSONObject object = (JSONObject) WebUtil.getJsonParser().parse(br);
|
JSONObject object = (JSONObject) WebUtil.getJsonParser().parse(br);
|
||||||
latestVersion = new Version((String) object.get("result"));
|
latestVersion = new Version((String) object.get("version"));
|
||||||
}
|
}
|
||||||
if (latestVersion != null) {
|
if (latestVersion != null) {
|
||||||
if (Configuration.BOT_VERSION.compareTo(latestVersion) < 0) {
|
if (Configuration.BOT_VERSION.compareTo(latestVersion) < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user