Skip to content

Commit b20d628

Browse files
committed
Update 1.2.42² (Fix #18)
1 parent 0a5b716 commit b20d628

File tree

1 file changed

+13
-3
lines changed
  • final/src/main/java/com/fox2code/foxloader/installer

1 file changed

+13
-3
lines changed

final/src/main/java/com/fox2code/foxloader/installer/Main.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public static void main(String[] args) throws ReflectiveOperationException, Malf
3232
boolean test = false;
3333
boolean with = false;
3434
boolean server = false;
35+
boolean nogui = false;
3536
switch (args[0]) {
3637
default:
3738
System.out.println("Unknown argument: " + args[0]);
@@ -42,6 +43,11 @@ public static void main(String[] args) throws ReflectiveOperationException, Malf
4243
System.out.println("--with-server -> Start server with specified server jar");
4344
System.out.println("--test-server -> Like --with-server but only load the strict necessary for ");
4445
return;
46+
case "nogui":
47+
case "--nogui":
48+
server = true;
49+
nogui = true;
50+
break;
4551
case "--platform":
4652
platform = true;
4753
break;
@@ -68,9 +74,13 @@ public static void main(String[] args) throws ReflectiveOperationException, Malf
6874
FoxLauncher.setEarlyMinecraftURL(file.toURI().toURL());
6975
}
7076
if (server) {
71-
int move = test ? 2 : 1;
72-
System.arraycopy(args, move, args, 0, args.length - move);
73-
ServerMain.main(Arrays.copyOf(args, args.length - move));
77+
if (nogui) {
78+
ServerMain.main(new String[]{"nogui"});
79+
} else {
80+
int move = test ? 2 : 1;
81+
System.arraycopy(args, move, args, 0, args.length - move);
82+
ServerMain.main(Arrays.copyOf(args, args.length - move));
83+
}
7484
return;
7585
}
7686
}

0 commit comments

Comments
 (0)