diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-20 00:14:43 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-20 00:14:43 +0100 |
commit | 86e9f31988715756c0fce31963a162b90ed0e2b6 (patch) | |
tree | bf1adc4fd3a700c9e19abfa03890938d7b953196 /src/main/java/at/hannibal2 | |
parent | 990d54fb54adbf66affcbaa4c90667ecc834f386 (diff) | |
download | skyhanni-86e9f31988715756c0fce31963a162b90ed0e2b6.tar.gz skyhanni-86e9f31988715756c0fce31963a162b90ed0e2b6.tar.bz2 skyhanni-86e9f31988715756c0fce31963a162b90ed0e2b6.zip |
Removed cooldown for clicking different names.
Diffstat (limited to 'src/main/java/at/hannibal2')
-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") |