diff options
-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 |