diff options
| author | Linnea Gräf <nea@nea.moe> | 2024-07-13 18:17:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-13 18:17:44 +0200 |
| commit | 5d77f2c5d873c37a88ede101b952d26f83f07a39 (patch) | |
| tree | 91b5301232b6b771f5deae9c9aeb2195782cf03a /src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | |
| parent | 3e9b8377f304f1f20de31e620d0ca188366df50b (diff) | |
| download | notenoughupdates-5d77f2c5d873c37a88ede101b952d26f83f07a39.tar.gz notenoughupdates-5d77f2c5d873c37a88ede101b952d26f83f07a39.tar.bz2 notenoughupdates-5d77f2c5d873c37a88ede101b952d26f83f07a39.zip | |
Add Glacite Tunnels info to /pv (#1138)
Co-authored-by: jani270 <69345714+jani270@users.noreply.github.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | 9 |
1 files changed, 6 insertions, 3 deletions
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 b94fac03..61a0deb1 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java @@ -125,7 +125,8 @@ public class Utils { EnumChatFormatting.DARK_PURPLE }; private static final Pattern CHROMA_REPLACE_PATTERN = Pattern.compile("\u00a7z(.+?)(?=\u00a7|$)"); - final static Pattern GUILD_OR_PARTY_MESSAGE_PATTERN = Pattern.compile("(?:Party|Guild|Officer) > (?:\\[.*\\] )?([a-zA-Z0-9_]+):? (?:\\[.*\\]: )?"); + final static Pattern GUILD_OR_PARTY_MESSAGE_PATTERN = Pattern.compile( + "(?:Party|Guild|Officer) > (?:\\[.*\\] )?([a-zA-Z0-9_]+):? (?:\\[.*\\]: )?"); private static final char[] c = new char[]{'k', 'm', 'b', 't'}; private static final LerpingFloat scrollY = new LerpingFloat(0, 100); public static boolean hasEffectOverride = false; @@ -2276,7 +2277,9 @@ public class Utils { private static long lastError = -1; - public static void showOutdatedRepoNotification(String missingFile) { + public static void showOutdatedRepoNotification(String missingFile) { showOutdatedRepoNotification(missingFile, null); } + + public static void showOutdatedRepoNotification(String missingFile, Throwable exception) { if (NotEnoughUpdates.INSTANCE.config.notifications.outdatedRepo) { NotificationHandler.displayNotification(Lists.newArrayList( EnumChatFormatting.RED + EnumChatFormatting.BOLD.toString() + "Missing repo data", @@ -2296,7 +2299,7 @@ public class Utils { ); } if (System.currentTimeMillis() - lastError > 1000) { - System.err.println("[NEU] Repo issue: " + missingFile); + NotEnoughUpdates.LOGGER.error("Repo issue: " + missingFile, exception); lastError = System.currentTimeMillis(); } } |
