diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-23 12:33:40 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-23 12:33:40 +0200 |
commit | 1576f32ac6dc71f4b0578eb96682c3eb74f86cde (patch) | |
tree | 91c6d89936a808ce48d6c2025e76a8db9ecce36b /src/main | |
parent | 03548be42728e1056743b4ae1ef1313d8a9c9bf7 (diff) | |
download | skyhanni-1576f32ac6dc71f4b0578eb96682c3eb74f86cde.tar.gz skyhanni-1576f32ac6dc71f4b0578eb96682c3eb74f86cde.tar.bz2 skyhanni-1576f32ac6dc71f4b0578eb96682c3eb74f86cde.zip |
Fixed error message when clicking a finished upgrade in the community shop.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt b/src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt index 5ededb3ee..3690d8ea3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt @@ -72,9 +72,10 @@ class AccountUpgradeReminder { if (!inInventory) return val clickedItemLore = event.slot?.stack?.getLore() ?: return if (clickedItemLore.getOrNull(0) != "ยง8Account Upgrade") return - duration = clickedItemLore.firstNotNullOf { + val result = clickedItemLore.firstNotNullOfOrNull { durationRegex.matchEntire(it) - }.groups[1]!!.value.toInt().days + } ?: return + duration = result.groups[1]!!.value.toInt().days } @SubscribeEvent |