diff options
Diffstat (limited to 'src/main/kotlin/features/mining/PickaxeAbility.kt')
-rw-r--r-- | src/main/kotlin/features/mining/PickaxeAbility.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/kotlin/features/mining/PickaxeAbility.kt b/src/main/kotlin/features/mining/PickaxeAbility.kt index a494989..4fcf8a7 100644 --- a/src/main/kotlin/features/mining/PickaxeAbility.kt +++ b/src/main/kotlin/features/mining/PickaxeAbility.kt @@ -127,12 +127,15 @@ object PickaxeAbility : FirmamentFeature { @Subscribe fun onProfileSwitch(event: ProfileSwitchEvent) { - lastUsage.clear() + lastUsage.entries.removeIf { + it.value < lobbyJoinTime + } } val abilityUsePattern = Pattern.compile("You used your (?<name>.*) Pickaxe Ability!") val fuelPattern = Pattern.compile("Fuel: .*/(?<maxFuel>$SHORT_NUMBER_FORMAT)") - val pickaxeAbilityCooldownPattern = Pattern.compile("Your pickaxe ability is on cooldown for (?<remainingCooldown>$TIME_PATTERN)\\.") + val pickaxeAbilityCooldownPattern = + Pattern.compile("Your pickaxe ability is on cooldown for (?<remainingCooldown>$TIME_PATTERN)\\.") data class PickaxeAbilityData( val name: String, |