@@ -26,7 +26,7 @@ public class RunsStorage {
2626 this .root = root ;
2727 }
2828
29- public List <Run > getRuns (String version ) {
29+ public List <DefaultRun > getDefaultRuns (String version ) {
3030 Path dir = this .dir (version );
3131 if (!Files .exists (dir ))
3232 return List .of ();
@@ -71,7 +71,7 @@ private void generateServerRun(FullVersion version, MinecraftMaven maven) throws
7171 throw new IllegalStateException ("Main-Class attribute is missing" );
7272 }
7373
74- Run run = new Run ("server" , mainClass , List .of ("nogui" ), List .of ("-Xmx1G" ));
74+ DefaultRun run = new DefaultRun ("server" , mainClass , List .of ("nogui" ), List .of ("-Xmx1G" ));
7575 this .writeRun (version , run );
7676 }
7777 }
@@ -80,17 +80,17 @@ private Path dir(String version) {
8080 return this .root .resolve (version );
8181 }
8282
83- private Run readRun (Path file ) {
84- return Run .parse (TinyJson .parseOrThrow (file ));
83+ private DefaultRun readRun (Path file ) {
84+ return DefaultRun .parse (TinyJson .parseOrThrow (file ));
8585 }
8686
87- private void writeRun (FullVersion version , Run run ) throws IOException {
87+ private void writeRun (FullVersion version , DefaultRun run ) throws IOException {
8888 Path file = this .dir (version .id ).resolve (run .name + ".json" );
8989 Files .createDirectories (file .getParent ());
9090 Files .writeString (file , run .encode ().toString ());
9191 }
9292
93- public record Run (String name , String mainClass , List <String > programArgs , List <String > jvmArgs ) {
93+ public record DefaultRun (String name , String mainClass , List <String > programArgs , List <String > jvmArgs ) {
9494 public JsonObject encode () {
9595 JsonObject json = new JsonObject ();
9696 json .put ("name" , this .name );
@@ -100,7 +100,7 @@ public JsonObject encode() {
100100 return json ;
101101 }
102102
103- public static Run parse (JsonValue value ) {
103+ public static DefaultRun parse (JsonValue value ) {
104104 JsonObject json = value .asObject ();
105105
106106 String name = json .get ("name" ).asString ().value ();
@@ -112,7 +112,7 @@ public static Run parse(JsonValue value) {
112112 .map (arg -> arg .asString ().value ())
113113 .toList ();
114114
115- return new Run (name , mainClass , programArgs , jvmArgs );
115+ return new DefaultRun (name , mainClass , programArgs , jvmArgs );
116116 }
117117 }
118118}
0 commit comments