Stop Trying To load Server Settings From Parabot's BDN

This commit is contained in:
Dark98
2021-10-21 20:51:54 +01:00
parent 82646880da
commit 8b3b90d5e7
2 changed files with 2 additions and 11 deletions
@@ -15,7 +15,6 @@ public class Configuration extends org.parabot.api.Configuration {
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 GET_SERVER_SETTINGS = "http://bdn.parabot.org/api/get.php?action=get_settings";
public static final String DATA_API = "http://bdn.parabot.org/api/v2/data/";
public static final String ITEM_API = DATA_API + "items/";
@@ -51,7 +51,7 @@ public class ServerProviderInfo {
}
/**
* Initialize configuration with data provided by {@link org.parabot.core.parsers.servers.LocalServers} from a {@code /parabot/servers/config.json} file. Also loads the default Settings map from the BDN.
* Initialize configuration with data provided by {@link org.parabot.core.parsers.servers.LocalServers} from a {@code /2006Scape/servers/config.json} file.
*
* @param clientJar Name of the client jar file
* @param hooks Name of the hooks file
@@ -64,7 +64,7 @@ public class ServerProviderInfo {
}
/**
* Initialize configuration with data provided by {@link org.parabot.core.parsers.servers.LocalServers} from a {@code /parabot/servers/config.json} file. Also loads the default Settings map from the BDN.
* Initialize configuration with data provided by {@link org.parabot.core.parsers.servers.LocalServers} from a {@code /2006Scape/servers/config.json} file.
*
* @param clientJar Name of the client jar file
* @param hooks Name of the hooks file
@@ -77,14 +77,6 @@ public class ServerProviderInfo {
this.properties = new Properties();
this.settings = new HashMap<>();
try {
BufferedReader br = WebUtil.getReader(new URL(Configuration.GET_SERVER_SETTINGS));
JSONObject settings = (JSONObject) WebUtil.getJsonParser().parse(br);
parseSettings(settings);
} catch (ParseException | IOException e) {
e.printStackTrace();
}
this.properties.setProperty("client_jar", clientJar);
this.properties.setProperty("hooks", hooks);
this.properties.setProperty("name", name);