File tree Expand file tree Collapse file tree
src/main/java/io/github/ImpactDevelopment/installer/target/targets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,34 +64,14 @@ public void addOrMutate(String name, String version) {
6464
6565 Optional <String > id = findProfileIdFromName (name );
6666 if (!id .isPresent ()) { // Create mode
67- if (profiles .has (name )) {
68- profiles .remove (name ); // just in case (shouldn't happen)
69-
70- }
71-
7267 profiles .add (name , profile = new JsonObject ());
7368 profile .addProperty ("name" , name );
7469 } else { // Mutate mode
7570 profile = profiles .get (id .get ()).getAsJsonObject ();
7671 }
77- if (profile .has ("lastUsed" )) {
78- profile .remove ("lastUsed" );
79- }
8072 profile .addProperty ("lastUsed" , dateFormat .format (new Date ())); // always bump.
81-
82- if (profile .has ("lastVersionId" )) {
83- profile .remove ("lastVersionId" );
84- }
8573 profile .addProperty ("lastVersionId" , version );
86-
87- if (profile .has ("icon" )) {
88- profile .remove ("icon" );
89- }
9074 profile .addProperty ("icon" , ICON );
91-
92- if (profile .has ("type" )) {
93- profile .remove ("type" );
94- }
9575 profile .addProperty ("type" , "custom" );
9676 }
9777
You can’t perform that action at this time.
0 commit comments