diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-06-19 12:55:28 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-06-19 12:55:28 +0200 |
commit | 93ac77c78cf0f2f4694d9629202cb5fa26563a63 (patch) | |
tree | a130d0a1b65832c48b48c3ef2b99779d16760d8a | |
parent | 4c9b2f977bda0aef5a7e714553d534b60b1ce308 (diff) | |
download | skyhanni-93ac77c78cf0f2f4694d9629202cb5fa26563a63.tar.gz skyhanni-93ac77c78cf0f2f4694d9629202cb5fa26563a63.tar.bz2 skyhanni-93ac77c78cf0f2f4694d9629202cb5fa26563a63.zip |
Workaround for IndexOutOfBoundsException
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt | 10 |
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) { |