diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt index a13cc6031..1070319c9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt @@ -513,9 +513,12 @@ class FarmingWeightDisplay { openWebsite(name, ignoreCooldown = true) } + var lastName = "" + private fun openWebsite(name: String, ignoreCooldown: Boolean = false) { - if (!ignoreCooldown && lastOpenWebsite.passedSince() < 5.seconds) return + if (!ignoreCooldown && lastOpenWebsite.passedSince() < 5.seconds && name == lastName) return lastOpenWebsite = SimpleTimeMark.now() + lastName = name OSUtils.openBrowser("https://elitebot.dev/@$name/") LorenzUtils.chat("Opening Farming Profile of player §b$name") |