mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-03 00:37:55 +00:00
Merge pull request #302 from Parabot/task/default-argument-output
[TASK] Added System.err output if an unknown argument is given
This commit is contained in:
@@ -27,15 +27,14 @@ public final class Landing {
|
|||||||
private static String username;
|
private static String username;
|
||||||
private static String password;
|
private static String password;
|
||||||
|
|
||||||
|
|
||||||
public static void main(String... args) throws IOException {
|
public static void main(String... args) throws IOException {
|
||||||
|
|
||||||
if (Context.getJavaVersion() >= 9){
|
if (Context.getJavaVersion() >= 9) {
|
||||||
UILog.log("Parabot", "Parabot doesn't support Java 9+ currently. Please downgrade to Java 8 to ensure Parabot is working correctly.");
|
UILog.log("Parabot", "Parabot doesn't support Java 9+ currently. Please downgrade to Java 8 to ensure Parabot is working correctly.");
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!System.getProperty("os.arch").contains("64")) {
|
if (!System.getProperty("os.arch").contains("64")) {
|
||||||
UILog.log("Parabot", "You are not running a 64-bit version of Java, this might cause the client to lag or crash unexpectedly.\r\n" +
|
UILog.log("Parabot", "You are not running a 64-bit version of Java, this might cause the client to lag or crash unexpectedly.\r\n" +
|
||||||
"It's recommended to upgrade to a 64-bit version.");
|
"It's recommended to upgrade to a 64-bit version.");
|
||||||
}
|
}
|
||||||
@@ -152,6 +151,9 @@ public final class Landing {
|
|||||||
case "-uuid":
|
case "-uuid":
|
||||||
Core.setQuickLaunchByUuid(Integer.parseInt(args[++i]));
|
Core.setQuickLaunchByUuid(Integer.parseInt(args[++i]));
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
System.err.println(String.format("Unknown argument given: %s", arg.toLowerCase()));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.parabot.core.network.proxy;
|
package org.parabot.core.network.proxy;
|
||||||
|
|
||||||
|
import org.parabot.core.Core;
|
||||||
import org.parabot.core.ui.utils.UILog;
|
import org.parabot.core.ui.utils.UILog;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
@@ -44,7 +45,7 @@ public class ProxySocket extends Socket {
|
|||||||
socket.close();
|
socket.close();
|
||||||
value++;
|
value++;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Core.verbose("Error closing proxy connection: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
|
|||||||
Reference in New Issue
Block a user