Skip to content

Commit

Permalink
refactor: Instantiate CreateGui only when GUI is actually about to be…
Browse files Browse the repository at this point in the history
… used
  • Loading branch information
Griefed committed Jul 22, 2021
1 parent bc4018e commit d39730c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/main/java/de/griefed/serverpackcreator/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ public static void main(String[] args) {
Configuration configuration = new Configuration(localizationManager, curseCreateModpack);
DefaultFiles defaultFiles = new DefaultFiles(localizationManager);
CreateServerPack createServerPack = new CreateServerPack(localizationManager, configuration, curseCreateModpack);
CreateGui createGui = new CreateGui(localizationManager, configuration, curseCreateModpack, createServerPack);

//noinspection UnusedAssignment
String jarPath = null,
Expand Down Expand Up @@ -185,8 +184,10 @@ public static void main(String[] args) {
// If no mode is specified and we have a graphical environment, start in GUI mode.
} else {

CreateGui createGui = new CreateGui(localizationManager, configuration, curseCreateModpack, createServerPack);

createGui.mainGUI();

}
}
}
}

0 comments on commit d39730c

Please sign in to comment.