forked from BLOCKFANTASY/LOOHP-Limbo
Do not stop server when receving unknown flags
This commit is contained in:
parent
c77c700fac
commit
1040e75ca9
2
pom.xml
2
pom.xml
|
|
@ -4,7 +4,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.loohp</groupId>
|
<groupId>com.loohp</groupId>
|
||||||
<artifactId>Limbo</artifactId>
|
<artifactId>Limbo</artifactId>
|
||||||
<version>0.3.7-ALPHA</version>
|
<version>0.3.8-ALPHA</version>
|
||||||
<build>
|
<build>
|
||||||
<sourceDirectory>src/main/java</sourceDirectory>
|
<sourceDirectory>src/main/java</sourceDirectory>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
||||||
|
|
@ -71,14 +71,14 @@ public class Limbo {
|
||||||
|
|
||||||
public static void main(String args[]) throws IOException, ParseException, NumberFormatException, ClassNotFoundException, InterruptedException {
|
public static void main(String args[]) throws IOException, ParseException, NumberFormatException, ClassNotFoundException, InterruptedException {
|
||||||
for (String flag : args) {
|
for (String flag : args) {
|
||||||
if (flag.equals("--nogui")) {
|
if (flag.equals("--nogui") || flag.equals("nogui")) {
|
||||||
noGui = true;
|
noGui = true;
|
||||||
} else {
|
} else if (flag.equals("--help")) {
|
||||||
System.out.println("Accepted flags:");
|
System.out.println("Accepted flags:");
|
||||||
System.out.println(" --nogui ");
|
System.out.println(" --nogui <- Disable the GUI");
|
||||||
System.out.println();
|
|
||||||
System.out.println("Press [enter] to quit");
|
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
|
} else {
|
||||||
|
System.out.println("Unknown flag: \"" + flag + "\". Ignoring...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (GraphicsEnvironment.isHeadless()) {
|
if (GraphicsEnvironment.isHeadless()) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue