aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-20 00:14:43 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-20 00:14:43 +0100
commit86e9f31988715756c0fce31963a162b90ed0e2b6 (patch)
treebf1adc4fd3a700c9e19abfa03890938d7b953196 /src/main/java/at/hannibal2
parent990d54fb54adbf66affcbaa4c90667ecc834f386 (diff)
downloadskyhanni-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.kt5
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")