mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-07 08:39:12 +00:00
Reformat of code
This commit is contained in:
@@ -13,86 +13,86 @@ import java.io.IOException;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Parabot v2
|
* Parabot v2
|
||||||
*
|
*
|
||||||
* @author Everel/Parnassian/Clisprail
|
* @author Everel/Parnassian/Clisprail
|
||||||
* @author Matt, Dane
|
* @author Matt, Dane
|
||||||
* @version 2.04
|
* @version 2.04
|
||||||
*/
|
*/
|
||||||
public final class Landing {
|
public final class Landing {
|
||||||
// forum account
|
// forum account
|
||||||
private static String username = null;
|
private static String username = null;
|
||||||
private static String password = null;
|
private static String password = null;
|
||||||
|
|
||||||
public static void main(String... args) throws IOException {
|
public static void main(String... args) throws IOException {
|
||||||
parseArgs(args);
|
parseArgs(args);
|
||||||
|
|
||||||
Core.verbose("Debug mode: " + Core.inDebugMode());
|
Core.verbose("Debug mode: " + Core.inDebugMode());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Core.verbose("Setting look and feel: "
|
Core.verbose("Setting look and feel: "
|
||||||
+ UIManager.getSystemLookAndFeelClassName());
|
+ UIManager.getSystemLookAndFeelClassName());
|
||||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
t.printStackTrace();
|
t.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Core.inDebugMode() && !Core.isValid()) {
|
if (!Core.inDebugMode() && !Core.isValid()) {
|
||||||
UILog.log(
|
UILog.log(
|
||||||
"Updates",
|
"Updates",
|
||||||
"Please download the newest version of parabot at http://www.parabot.org/",
|
"Please download the newest version of parabot at http://www.parabot.org/",
|
||||||
JOptionPane.INFORMATION_MESSAGE);
|
JOptionPane.INFORMATION_MESSAGE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Core.verbose("Validating directories...");
|
Core.verbose("Validating directories...");
|
||||||
Directories.validate();
|
Directories.validate();
|
||||||
Core.verbose("Validating account manager...");
|
Core.verbose("Validating account manager...");
|
||||||
AccountManager.validate();
|
AccountManager.validate();
|
||||||
|
|
||||||
if (username != null && password != null) {
|
if (username != null && password != null) {
|
||||||
new LoginUI(username, password);
|
new LoginUI(username, password);
|
||||||
username = null;
|
username = null;
|
||||||
password = null;
|
password = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Core.verbose("Starting login gui...");
|
Core.verbose("Starting login gui...");
|
||||||
new LoginUI().setVisible(true);
|
new LoginUI().setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void parseArgs(String... args) {
|
private static void parseArgs(String... args) {
|
||||||
for (int i = 0; i < args.length; i++) {
|
for (int i = 0; i < args.length; i++) {
|
||||||
final String arg = args[i].toLowerCase();
|
final String arg = args[i].toLowerCase();
|
||||||
switch (arg.toLowerCase()) {
|
switch (arg.toLowerCase()) {
|
||||||
case "-createdirs":
|
case "-createdirs":
|
||||||
Directories.validate();
|
Directories.validate();
|
||||||
System.out
|
System.out
|
||||||
.println("Directories created, you can now run parabot.");
|
.println("Directories created, you can now run parabot.");
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
break;
|
break;
|
||||||
case "-debug":
|
case "-debug":
|
||||||
Core.setDebug(true);
|
Core.setDebug(true);
|
||||||
break;
|
break;
|
||||||
case "-v":
|
case "-v":
|
||||||
case "-verbose":
|
case "-verbose":
|
||||||
Core.setVerbose(true);
|
Core.setVerbose(true);
|
||||||
break;
|
break;
|
||||||
case "-server":
|
case "-server":
|
||||||
ServerSelector.initServer = args[++i];
|
ServerSelector.initServer = args[++i];
|
||||||
break;
|
break;
|
||||||
case "-login":
|
case "-login":
|
||||||
username = args[++i];
|
username = args[++i];
|
||||||
password = args[++i];
|
password = args[++i];
|
||||||
break;
|
break;
|
||||||
case "-proxy":
|
case "-proxy":
|
||||||
Ip.spoofIP(args[++i], args[++i]);
|
Ip.spoofIP(args[++i], args[++i]);
|
||||||
break;
|
break;
|
||||||
case "-loadlocal":
|
case "-loadlocal":
|
||||||
Core.setLoadLocal(true);
|
Core.setLoadLocal(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user