aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/mapper/writer/MappingWriter.java
diff options
context:
space:
mode:
author zaaarf <me@zaaarf.foo>2024-05-31 19:41:42 +0200
committer zaaarf <me@zaaarf.foo>2024-05-31 19:41:42 +0200
commitc220472d5acc34c806f4b7464c6c268136bfe7dc (patch)
tree5d1f0fd751d568f04167dac777a1111f1a1fa10a /src/main/java/ftbsc/lll/mapper/writer/MappingWriter.java
parent81ec0e4140a4016f5b9c88d3400c5c181b6d1493 (diff)
fix: assorted bugfixesHEAD0.1.1dev
Diffstat (limited to 'src/main/java/ftbsc/lll/mapper/writer/MappingWriter.java')
-rw-r--r--src/main/java/ftbsc/lll/mapper/writer/MappingWriter.java18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/main/java/ftbsc/lll/mapper/writer/MappingWriter.java b/src/main/java/ftbsc/lll/mapper/writer/MappingWriter.java
index 36b117f..eb073b5 100644
--- a/src/main/java/ftbsc/lll/mapper/writer/MappingWriter.java
+++ b/src/main/java/ftbsc/lll/mapper/writer/MappingWriter.java
@@ -30,23 +30,9 @@ public class MappingWriter {
args = cmdLine.getArgs();
//separate normal args from custom args
- int cursor;
- for(cursor = 0; cursor < args.length; cursor++)
- if(args[cursor].equals("-a"))
- break;
- String[] customArgs;
- if(cursor != args.length) {
- int len = args.length - cursor - 1;
- customArgs = new String[len];
- System.arraycopy(args, cursor + 1, customArgs, 0, len);
- String[] newArgs = new String[cursor];
- System.arraycopy(args, 0, newArgs, 0, cursor);
- args = newArgs;
- } else customArgs = new String[0];
-
if(args.length < 3) {
System.err.println("Bad argument count!");
- System.err.println("java -jar mapping-writer.jar [-r] [-o] <location> <format> <output> [-a <custom args>]");
+ System.err.println("java -jar mapping-writer.jar [-r] [-o] <location> <format> <output> [[custom args]]");
return;
}
@@ -85,7 +71,7 @@ public class MappingWriter {
//call the writer
PrintWriter printWriter = new PrintWriter(new FileWriter(targetFile));
- writer.write(mapper, printWriter, customArgs);
+ writer.write(mapper, printWriter, Arrays.copyOfRange(args, 3, args.length));
printWriter.close();
}
}