Download Randoms.jar From 2006Scape.org

This commit is contained in:
Dark98
2021-10-06 15:32:03 +01:00
parent ccbeb98987
commit 7dd17d8b74
3 changed files with 4 additions and 3 deletions
@@ -9,12 +9,13 @@ import org.parabot.environment.api.utils.Version;
*/ */
public class Configuration extends org.parabot.api.Configuration { public class Configuration extends org.parabot.api.Configuration {
public static final String GET_RANDOMS = "https://2006Scape.org/Downloads/bot/Randoms-0.26.1.jar";
public static final String GET_SERVER_PROVIDER_TYPE = "http://v3.bdn.parabot.org/api/bot/server/type?server=%s"; public static final String GET_SERVER_PROVIDER_TYPE = "http://v3.bdn.parabot.org/api/bot/server/type?server=%s";
public static final String SERVER_PROVIDER_INFO = "http://v3.bdn.parabot.org/api/bot/list/%s?latest=true"; public static final String SERVER_PROVIDER_INFO = "http://v3.bdn.parabot.org/api/bot/list/%s?latest=true";
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 API_DOWNLOAD_BOT = "http://v3.bdn.parabot.org/api/bot/download/client"; public static final String API_DOWNLOAD_BOT = "http://v3.bdn.parabot.org/api/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 GET_RANDOMS = "http://v3.bdn.parabot.org/api/bot/download/randoms";
public static final String DATA_API = "http://bdn.parabot.org/api/v2/data/"; public static final String DATA_API = "http://bdn.parabot.org/api/v2/data/";
public static final String ITEM_API = DATA_API + "items/"; public static final String ITEM_API = DATA_API + "items/";
@@ -160,7 +160,7 @@ public class ServerProviderInfo {
String randomsUrl = properties.getProperty("randoms_jar"); String randomsUrl = properties.getProperty("randoms_jar");
if (randomsUrl == null || randomsUrl.length() == 0) { if (randomsUrl == null || randomsUrl.length() == 0) {
// Fallback to default BDN URL if there is no 'randoms' specified in the server JSON configuration. // Fallback to default BDN URL if there is no 'randoms' specified in the server JSON configuration.
randomsUrl = Configuration.GET_RANDOMS + (Configuration.BOT_VERSION.isNightly() ? Configuration.NIGHTLY_APPEND : ""); randomsUrl = Configuration.GET_RANDOMS;
} }
return new URL(randomsUrl); return new URL(randomsUrl);
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
@@ -96,7 +96,7 @@ public class LocalServers extends ServerParser {
String randoms = (String) locations.get("randoms"); String randoms = (String) locations.get("randoms");
if (randoms == null) { if (randoms == null) {
randoms = Configuration.GET_RANDOMS + (Configuration.BOT_VERSION.isNightly() ? Configuration.NIGHTLY_APPEND : ""); randoms = Configuration.GET_RANDOMS;
} }
Core.verbose("[LocalServers]: Parsed server: " + name); Core.verbose("[LocalServers]: Parsed server: " + name);