diff options
Diffstat (limited to 'src/main')
3 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java index 82db6373..76387844 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java @@ -215,7 +215,8 @@ public class NotEnoughUpdates { )) ) { config = gson.fromJson(reader, NEUConfig.class); - } catch (Exception ignored) { + } catch (Exception exc) { + new RuntimeException("Invalid config file. This will reset the config to default", exc).printStackTrace(); } } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/NEUEventListener.java index d5b39487..26c2d1f9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/listener/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/NEUEventListener.java @@ -131,7 +131,7 @@ public class NEUEventListener { boolean hasPreReleaseAvailableForUpdate = fullReleaseVersion == NotEnoughUpdates.VERSION_ID && preReleaseVersion > NotEnoughUpdates.PRE_VERSION_ID; - int updateChannel = NotEnoughUpdates.INSTANCE.config.notifications.showUpdateMsg; /* 1 = Full, 2 = Pre */ + int updateChannel = NotEnoughUpdates.INSTANCE.config.notifications.updateChannel; /* 1 = Full, 2 = Pre */ if (hasFullReleaseAvailableForUpgrade || (hasHotfixAvailableForUpgrade && updateChannel == 1)) { displayUpdateMessage(o, o.get("update_msg").getAsString(), o.get("update_link").getAsString()); } else if (hasPreReleaseAvailableForUpdate && updateChannel == 2) { @@ -265,7 +265,7 @@ public class NEUEventListener { if (!joinedSB) { joinedSB = true; - if (NotEnoughUpdates.INSTANCE.config.notifications.showUpdateMsg != 0) { + if (NotEnoughUpdates.INSTANCE.config.notifications.updateChannel != 0) { displayUpdateMessageIfOutOfDate(); } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Notifications.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Notifications.java index c89110aa..e25a535f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Notifications.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Notifications.java @@ -32,7 +32,7 @@ public class Notifications { desc = "Give a notification in chat whenever a new version of NEU is released" ) @ConfigEditorDropdown(values = {"Off", "Releases", "Pre-Releases"}) - public int showUpdateMsg = 1; + public int updateChannel = 1; @Expose @ConfigOption( |