aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-06-19 12:55:28 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-06-19 12:55:28 +0200
commit93ac77c78cf0f2f4694d9629202cb5fa26563a63 (patch)
treea130d0a1b65832c48b48c3ef2b99779d16760d8a /src/main
parent4c9b2f977bda0aef5a7e714553d534b60b1ce308 (diff)
downloadskyhanni-93ac77c78cf0f2f4694d9629202cb5fa26563a63.tar.gz
skyhanni-93ac77c78cf0f2f4694d9629202cb5fa26563a63.tar.bz2
skyhanni-93ac77c78cf0f2f4694d9629202cb5fa26563a63.zip
Workaround for IndexOutOfBoundsException
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
index 6549efaa9..fabff46ba 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
@@ -182,9 +182,13 @@ class NonGodPotEffectDisplay {
for (line in lines) {
for (effect in NonGodPotEffect.values()) {
if (line.startsWith(effect.displayName)) {
- val duration = TimeUtils.getMillis(line.split("§f")[1])
- effectDuration[effect] = System.currentTimeMillis() + duration
- update()
+ try {
+ val duration = TimeUtils.getMillis(line.split("§f")[1])
+ effectDuration[effect] = System.currentTimeMillis() + duration
+ update()
+ } catch (e: IndexOutOfBoundsException) {
+ LorenzUtils.debug("Error while reading non god pot effects from tab list! line: '$line'")
+ }
}
}
patternEffectsCount.matchMatcher(line) {