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:
Jeroen Ketelaar
2019-05-04 18:32:27 -05:00
committed by GitHub
2 changed files with 7 additions and 4 deletions
+5 -3
View File
@@ -27,15 +27,14 @@ public final class Landing {
private static String username;
private static String password;
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.");
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" +
"It's recommended to upgrade to a 64-bit version.");
}
@@ -152,6 +151,9 @@ public final class Landing {
case "-uuid":
Core.setQuickLaunchByUuid(Integer.parseInt(args[++i]));
break;
default:
System.err.println(String.format("Unknown argument given: %s", arg.toLowerCase()));
break;
}
}
}
@@ -1,5 +1,6 @@
package org.parabot.core.network.proxy;
import org.parabot.core.Core;
import org.parabot.core.ui.utils.UILog;
import javax.swing.*;
@@ -44,7 +45,7 @@ public class ProxySocket extends Socket {
socket.close();
value++;
} catch (Exception e) {
Core.verbose("Error closing proxy connection: " + e.getMessage());
}
}
return value;