File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
src/main/java/lol/hyper/customlauncher Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public class ConfigHandler {
3333 private final Logger logger = LogManager .getLogger (this );
3434
3535 public ConfigHandler () {
36- loadConfig ();
36+ loadConfig (true );
3737 }
3838
3939 public boolean showCogInvasionNotifications () {
@@ -75,7 +75,7 @@ private void setDefaults() {
7575 }
7676
7777 /** Load the config from disk into the JSON object. */
78- public void loadConfig () {
78+ public void loadConfig (boolean log ) {
7979 if (!CONFIG_FILE .exists ()) {
8080 jsonObject = new JSONObject ();
8181 } else {
@@ -95,9 +95,11 @@ public void loadConfig() {
9595 setDefaults ();
9696 INSTALL_LOCATION = new File (jsonObject .getString ("ttrInstallLocation" ));
9797
98- logger .info ("Config version: " + jsonObject .getInt ("version" ));
99- logger .info ("showInvasionNotifications: " + showCogInvasionNotifications ());
100- logger .info ("showFieldOfficeNotifications: " + showFieldOfficeNotifications ());
101- logger .info ("ttrInstallLocation: " + INSTALL_LOCATION .getAbsolutePath ());
98+ if (log ) {
99+ logger .info ("Config version: " + jsonObject .getInt ("version" ));
100+ logger .info ("showInvasionNotifications: " + showCogInvasionNotifications ());
101+ logger .info ("showFieldOfficeNotifications: " + showFieldOfficeNotifications ());
102+ logger .info ("ttrInstallLocation: " + INSTALL_LOCATION .getAbsolutePath ());
103+ }
102104 }
103105}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public class ConfigWindow extends JFrame {
3030 private final Logger logger = LogManager .getLogger (this );
3131
3232 public ConfigWindow (ConfigHandler configHandler ) {
33- configHandler .loadConfig ();
33+ configHandler .loadConfig (false );
3434 JFrame frame = new JFrame ("Configuration" );
3535 frame .setSize (370 , 270 );
3636 frame .setDefaultCloseOperation (WindowConstants .DISPOSE_ON_CLOSE );
You can’t perform that action at this time.
0 commit comments