mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-03 00:37:55 +00:00
Code style fixes
This commit is contained in:
@@ -136,7 +136,7 @@ public final class Landing {
|
||||
Core.disableValidation();
|
||||
break;
|
||||
case "-uuid":
|
||||
Core.quickLaunchByUuid = Integer.parseInt(args[++i]);
|
||||
Core.setQuickLaunchByUuid(Integer.parseInt(args[++i]));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@ import java.security.NoSuchAlgorithmException;
|
||||
@SuppressWarnings("Duplicates")
|
||||
public class Core {
|
||||
|
||||
public static int quickLaunchByUuid; // used like -server, but denoted by an Int rather than the server name
|
||||
private static boolean debug; // in debug mode, we will print more detailed error messages.
|
||||
private static int quickLaunchByUuid = -1; // used like -server, but denoted by an Int rather than the server name
|
||||
private static boolean debug; // in debug mode, we will print more detailed error messages.
|
||||
private static boolean verbose;
|
||||
private static boolean dump;
|
||||
private static boolean loadLocal; //Loads both local and public scripts/servers
|
||||
@@ -47,6 +47,14 @@ public class Core {
|
||||
return validate;
|
||||
}
|
||||
|
||||
public static int getQuickLaunchByUuid() {
|
||||
return quickLaunchByUuid;
|
||||
}
|
||||
|
||||
public static void setQuickLaunchByUuid(int quickLaunchByUuid) {
|
||||
Core.quickLaunchByUuid = quickLaunchByUuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enabled loadLocal mode
|
||||
*
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ServerSelector extends JPanel {
|
||||
|
||||
public ServerSelector() {
|
||||
Queue<ServerComponent> widgets = getServers();
|
||||
if (initServer != null || Core.quickLaunchByUuid > 0) {
|
||||
if (initServer != null || Core.getQuickLaunchByUuid() > -1) {
|
||||
if (runServer(widgets)) {
|
||||
initServer = null;
|
||||
return;
|
||||
@@ -76,13 +76,14 @@ public class ServerSelector extends JPanel {
|
||||
if (widgets == null || widgets.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
if (Core.quickLaunchByUuid > 0) { // match the pre-requested server config uuid to quick-launch
|
||||
if (Core.getQuickLaunchByUuid() > -1) { // match the pre-requested server config uuid to quick-launch
|
||||
for (ServerComponent widget : widgets) {
|
||||
if (widget.desc.uuid == Core.quickLaunchByUuid) {
|
||||
if (widget.desc.uuid == Core.getQuickLaunchByUuid()) {
|
||||
Environment.load(widget.desc);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
System.err.println("No server config with -uuid "+Core.getQuickLaunchByUuid()+" was found to quick launch.");
|
||||
}
|
||||
|
||||
if (initServer != null) {
|
||||
@@ -93,6 +94,7 @@ public class ServerSelector extends JPanel {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
System.err.println("No server config with -server "+serverName+" was found to quick launch.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user