From dbd6090a3a232d2211b898df8e026eac68e5abdb Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Thu, 14 Mar 2024 06:26:07 +1100 Subject: Backend + Fix: Improve visitor getting (#1121) --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 + .../features/garden/visitor/GardenVisitorTimer.kt | 28 ++++++------ .../skyhanni/features/garden/visitor/VisitorAPI.kt | 50 +++++++++++++--------- .../features/garden/visitor/VisitorListener.kt | 4 +- 4 files changed, 46 insertions(+), 38 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index b101662f2..2732d68b8 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -208,6 +208,7 @@ import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorFeatures import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorTimer import at.hannibal2.skyhanni.features.garden.visitor.HighlightVisitorsOutsideOfGarden import at.hannibal2.skyhanni.features.garden.visitor.NPCVisitorFix +import at.hannibal2.skyhanni.features.garden.visitor.VisitorAPI import at.hannibal2.skyhanni.features.garden.visitor.VisitorListener import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern @@ -498,6 +499,7 @@ class SkyHanniMod { loadModule(BitsAPI) loadModule(MayorAPI) loadModule(SkillAPI) + loadModule(VisitorAPI) loadModule(IsFishingDetection) loadModule(LorenzUtils) loadModule(NEUItems) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt index 09e02c94f..ef1077cf9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt @@ -33,8 +33,8 @@ class GardenVisitorTimer { private val config get() = GardenAPI.config.visitors.timer private val timePattern by RepoPattern.pattern( - "garden.visitor.timer.time", - "§b§lVisitors: §r§f\\((?