From 93ac77c78cf0f2f4694d9629202cb5fa26563a63 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 19 Jun 2023 12:55:28 +0200 Subject: Workaround for IndexOutOfBoundsException --- .../hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2') 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) { -- cgit