aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-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")