aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2024-08-08 17:36:19 +1000
committerGitHub <noreply@github.com>2024-08-08 17:36:19 +1000
commita826e83f30ea6af42cd042404826641c34cd71d5 (patch)
tree351dd0b62bb0e71385fe300f3c3b75a00d153779
parent805cc17bddfadf38627612a7447cb69c43f8c06b (diff)
downloadnotenoughupdates-a826e83f30ea6af42cd042404826641c34cd71d5.tar.gz
notenoughupdates-a826e83f30ea6af42cd042404826641c34cd71d5.tar.bz2
notenoughupdates-a826e83f30ea6af42cd042404826641c34cd71d5.zip
Fix number format exception when getting got pot time from tablist (#1302)
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java
index 96260e7f..95b8b56a 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java
@@ -492,6 +492,7 @@ public class TimersOverlay extends TextTabOverlay {
if (activeEffectsMatcher.group(i) == null) {
continue;
}
+ if (activeEffectsMatcher.group(i).startsWith(" ")) break;
godpotRemainingTime = Integer.parseInt(activeEffectsMatcher.group(i));
godpotRemainingTimeType = activeEffectsMatcher.group(i + 1);
godPotDuration +=
@@ -512,6 +513,7 @@ public class TimersOverlay extends TextTabOverlay {
if (godPotionMatcher.group(i) == null) {
continue;
}
+ if (godPotionMatcher.group(i).startsWith(" ")) break;
godpotRemainingTime = Integer.parseInt(godPotionMatcher.group(i));
godpotRemainingTimeType = godPotionMatcher.group(i + 1);
godPotDuration +=