mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-02 16:49:10 +00:00
[CLEANUP] Formatted code
This commit is contained in:
+5
-5
@@ -24,9 +24,9 @@ import java.net.URL;
|
||||
* @author JKetelaar
|
||||
*/
|
||||
public class LocalPublicServerExecuter extends ServerExecuter {
|
||||
private String serverName;
|
||||
private String serverUrl;
|
||||
private String providerUrl;
|
||||
private String serverName;
|
||||
private String serverUrl;
|
||||
private String providerUrl;
|
||||
private ServerProviderInfo serverProviderInfo;
|
||||
|
||||
public LocalPublicServerExecuter(final String serverName, final ServerProviderInfo serverProviderInfo, String serverUrl, String providerUrl) {
|
||||
@@ -80,8 +80,8 @@ public class LocalPublicServerExecuter extends ServerExecuter {
|
||||
|
||||
BuildPath.add(destination.toURI().toURL());
|
||||
|
||||
ServerLoader serverLoader = new ServerLoader(classPath);
|
||||
final String[] classNames = serverLoader.getServerClassNames();
|
||||
ServerLoader serverLoader = new ServerLoader(classPath);
|
||||
final String[] classNames = serverLoader.getServerClassNames();
|
||||
if (classNames.length == 0) {
|
||||
UILog.log(
|
||||
"Error",
|
||||
|
||||
@@ -16,8 +16,8 @@ import java.net.MalformedURLException;
|
||||
*/
|
||||
public class LocalServerExecuter extends ServerExecuter {
|
||||
private final Constructor<?> serverProviderConstructor;
|
||||
private ClassPath classPath;
|
||||
private String serverName;
|
||||
private ClassPath classPath;
|
||||
private String serverName;
|
||||
|
||||
public LocalServerExecuter(Constructor<?> serverProviderConstructor,
|
||||
ClassPath classPath, final String serverName) {
|
||||
|
||||
@@ -36,10 +36,9 @@ public class PublicServerExecuter extends ServerExecuter {
|
||||
}
|
||||
|
||||
};
|
||||
private String serverName;
|
||||
|
||||
private PBLocalPreferences settings;
|
||||
private final String cacheVersionKey = "cachedProviderVersion";
|
||||
private String serverName;
|
||||
private PBLocalPreferences settings;
|
||||
|
||||
public PublicServerExecuter(final String serverName) {
|
||||
this.serverName = serverName;
|
||||
@@ -58,14 +57,14 @@ public class PublicServerExecuter extends ServerExecuter {
|
||||
Core.verbose("Downloading: " + jarUrl + " ...");
|
||||
|
||||
String providerVersion = serverProviderInfo.getProviderVersion();
|
||||
if(providerVersion == null) {
|
||||
if (providerVersion == null) {
|
||||
providerVersion = "error";
|
||||
}
|
||||
|
||||
settings = new PBLocalPreferences(serverProviderInfo.getClientCRC32()+".json");
|
||||
if(settings.getSetting(cacheVersionKey) != null) {
|
||||
settings = new PBLocalPreferences(serverProviderInfo.getClientCRC32() + ".json");
|
||||
if (settings.getSetting(cacheVersionKey) != null) {
|
||||
Core.verbose(String.format("Latest provider version: %s, local provider version: %s", settings.getSetting(cacheVersionKey), providerVersion));
|
||||
if(!settings.getSetting(cacheVersionKey).equals(providerVersion)) {
|
||||
if (!settings.getSetting(cacheVersionKey).equals(providerVersion)) {
|
||||
Core.verbose("Local provider outdated, clearing cache.");
|
||||
Directories.clearCache();
|
||||
}
|
||||
@@ -88,8 +87,8 @@ public class PublicServerExecuter extends ServerExecuter {
|
||||
|
||||
BuildPath.add(destination.toURI().toURL());
|
||||
|
||||
ServerLoader serverLoader = new ServerLoader(classPath);
|
||||
final String[] classNames = serverLoader.getServerClassNames();
|
||||
ServerLoader serverLoader = new ServerLoader(classPath);
|
||||
final String[] classNames = serverLoader.getServerClassNames();
|
||||
if (classNames == null || classNames.length == 0) {
|
||||
UILog.log(
|
||||
"Error",
|
||||
|
||||
Reference in New Issue
Block a user