diff options
author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2022-08-13 07:15:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-13 09:15:16 +0200 |
commit | 3571d2bba813a0f260f0d0356da0dd0c19660b00 (patch) | |
tree | e4866f426f54f282bcda47d7a712f98439de3ff0 | |
parent | 8806bf4409b5ca510d465ad2a4784ab27c27debd (diff) | |
download | NotEnoughUpdates-3571d2bba813a0f260f0d0356da0dd0c19660b00.tar.gz NotEnoughUpdates-3571d2bba813a0f260f0d0356da0dd0c19660b00.tar.bz2 NotEnoughUpdates-3571d2bba813a0f260f0d0356da0dd0c19660b00.zip |
i forgot to make a pr :skull: (#220)
* https://cdn.discordapp.com/attachments/832652653292027904/998120255245262848/unknown.png
* added repo warning toggle
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Notifications.java | 8 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | 26 |
2 files changed, 20 insertions, 14 deletions
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 98d429d0..85ad2093 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 @@ -36,6 +36,14 @@ public class Notifications { @Expose @ConfigOption( + name = "Missing repo warning", + desc = "Warning when repo data is missing or out of date" + ) + @ConfigEditorBoolean + public boolean outdatedRepo = true; + + @Expose + @ConfigOption( name = "RAM Warning", desc = "Warning when game starts with lots of RAM allocated\n" + "\u00a7cBefore disabling this, please seriously read the message. If you complain about FPS issues without listening to the warning, that's your fault." diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java index 9713b69a..5d6af2aa 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java @@ -1940,20 +1940,18 @@ public class Utils { } public static void showOutdatedRepoNotification() { - NotificationHandler.displayNotification(Lists.newArrayList( - EnumChatFormatting.RED + EnumChatFormatting.BOLD.toString() + "Missing repo data", - EnumChatFormatting.RED + - "Data used for many NEU features is not up to date, this should normally not be the case.", - EnumChatFormatting.RED + "You can try " + EnumChatFormatting.BOLD + "/neuresetrepo" + EnumChatFormatting.RESET + - EnumChatFormatting.RED + " and restart your game" + - " to see if that fixes the issue.", - EnumChatFormatting.RED + "If the problem persists please join " + EnumChatFormatting.BOLD + - "discord.gg/moulberry" + - EnumChatFormatting.RESET + EnumChatFormatting.RED + " and message in " + EnumChatFormatting.BOLD + - "#neu-support" + EnumChatFormatting.RESET + EnumChatFormatting.RED + " to get support" - ), - true, true - ); + if (NotEnoughUpdates.INSTANCE.config.notifications.outdatedRepo) { + NotificationHandler.displayNotification(Lists.newArrayList( + EnumChatFormatting.RED + EnumChatFormatting.BOLD.toString() + "Missing repo data", + EnumChatFormatting.RED + "Data used for many NEU features is not up to date, this should normally not be the case.", + EnumChatFormatting.RED + "You can try " + EnumChatFormatting.BOLD + "/neuresetrepo" + EnumChatFormatting.RESET + EnumChatFormatting.RED +" and restart your game" + + " to see if that fixes the issue.", EnumChatFormatting.RED + "If the problem persists please join " + EnumChatFormatting.BOLD + "discord.gg/moulberry" + + EnumChatFormatting.RESET + EnumChatFormatting.RED + " and message in " + EnumChatFormatting.BOLD + + "#neu-support" + EnumChatFormatting.RESET + EnumChatFormatting.RED + " to get support" + ), + true, true + ); + } } /** |