Skip to content

Commit 4ca005f

Browse files
Füge Unterstützung für Argumentverarbeitung in EaglerBuildTools hinzu
1 parent 573d1a5 commit 4ca005f

5 files changed

Lines changed: 13 additions & 4 deletions

File tree

buildtools/BuildTools.jar

1017 Bytes
Binary file not shown.

buildtools/src/main/java/net/lax1dude/eaglercraft/v1_8/buildtools/EaglerBuildTools.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public class EaglerBuildTools {
3131
public static File repositoryRoot = new File(".");
3232

3333
public static void main(String[] args) {
34+
Storage.args = args;
3435
System.out.println("Eaglercraft 1.8 Build Tools");
3536
System.out.println("Copyright (c) 2022-2025 lax1dude");
3637
System.out.println();
@@ -68,7 +69,7 @@ public static void main(String[] args) {
6869
LicensePrompt.main(args);
6970
System.out.println("Running task '" + args[0] + "':");
7071
System.out.println();
71-
if(InitTask.initTask()) {
72+
if(InitTask.initTask(args)) {
7273
System.out.println();
7374
System.out.println("Task Complete.");
7475
System.out.println();

buildtools/src/main/java/net/lax1dude/eaglercraft/v1_8/buildtools/EaglerBuildToolsConfig.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ public static File getWorkspaceDirectory() {
150150
}
151151

152152
public static File askIfChangeIsWanted(File in) {
153+
if (Storage.args.length > 1 && Storage.args[1].equalsIgnoreCase("--build")) {
154+
return in;
155+
}
153156
System.out.println("Would you like to change this directory?");
154157
System.out.println("Enter 'Y' for yes or 'N' for no: ");
155158
String l = "N";
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package net.lax1dude.eaglercraft.v1_8.buildtools;
2+
3+
public class Storage {
4+
public static String[] args;
5+
}

buildtools/src/main/java/net/lax1dude/eaglercraft/v1_8/buildtools/task/init/InitTask.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ public class InitTask {
3131
private static File locatedMinecraftJar = null;
3232
private static File locatedAssetsJson = null;
3333

34-
public static boolean initTask() {
34+
public static boolean initTask(String[] args) {
3535
try {
36-
return initTask0();
36+
return initTask0(args);
3737
}catch(Throwable t) {
3838
System.err.println();
3939
System.err.println("Exception encountered while running task 'init'!");
@@ -42,7 +42,7 @@ public static boolean initTask() {
4242
}
4343
}
4444

45-
private static boolean initTask0() throws Throwable {
45+
private static boolean initTask0(String[] args) throws Throwable {
4646
System.out.println("Scanning 'mcp918' folder...");
4747
File mcp918dir = new File(EaglerBuildTools.repositoryRoot, "mcp918");
4848

0 commit comments

Comments
 (0)