Skip to content

Commit

Permalink
Update 1.2.42² (Fix #18)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fox2Code committed Apr 6, 2024
1 parent 0a5b716 commit b20d628
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions final/src/main/java/com/fox2code/foxloader/installer/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public static void main(String[] args) throws ReflectiveOperationException, Malf
boolean test = false;
boolean with = false;
boolean server = false;
boolean nogui = false;
switch (args[0]) {
default:
System.out.println("Unknown argument: " + args[0]);
Expand All @@ -42,6 +43,11 @@ public static void main(String[] args) throws ReflectiveOperationException, Malf
System.out.println("--with-server -> Start server with specified server jar");
System.out.println("--test-server -> Like --with-server but only load the strict necessary for ");
return;
case "nogui":
case "--nogui":
server = true;
nogui = true;
break;
case "--platform":
platform = true;
break;
Expand All @@ -68,9 +74,13 @@ public static void main(String[] args) throws ReflectiveOperationException, Malf
FoxLauncher.setEarlyMinecraftURL(file.toURI().toURL());
}
if (server) {
int move = test ? 2 : 1;
System.arraycopy(args, move, args, 0, args.length - move);
ServerMain.main(Arrays.copyOf(args, args.length - move));
if (nogui) {
ServerMain.main(new String[]{"nogui"});
} else {
int move = test ? 2 : 1;
System.arraycopy(args, move, args, 0, args.length - move);
ServerMain.main(Arrays.copyOf(args, args.length - move));
}
return;
}
}
Expand Down

0 comments on commit b20d628

Please sign in to comment.