From 2e12fc657e03c26f26e61b5e9da939b23a73f528 Mon Sep 17 00:00:00 2001 From: jani270 <69345714+jani270@users.noreply.github.com> Date: Thu, 11 Jan 2024 15:50:52 +0100 Subject: Added-Lesser-Orb-of-Healing-Hider (#904) Lesser Orb of Healing Hider. #904 --- src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/utils') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index c4c2dfa93..6f189da4d 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -35,6 +35,7 @@ import java.text.SimpleDateFormat import java.util.Collections import java.util.Timer import java.util.TimerTask +import java.util.WeakHashMap import java.util.regex.Matcher import kotlin.properties.ReadWriteProperty import kotlin.reflect.KMutableProperty1 @@ -523,8 +524,8 @@ object LorenzUtils { val tileSign = (this as AccessorGuiEditSign).tileSign return (tileSign.signText[1].unformattedText.removeColor() == "^^^^^^" - && tileSign.signText[2].unformattedText.removeColor() == "Set your" - && tileSign.signText[3].unformattedText.removeColor() == "speed cap!") + && tileSign.signText[2].unformattedText.removeColor() == "Set your" + && tileSign.signText[3].unformattedText.removeColor() == "speed cap!") } fun IslandType.isInIsland() = inSkyBlock && skyBlockIsland == this @@ -655,4 +656,7 @@ object LorenzUtils { fun Matcher.groupOrNull(groupName: String): String? { return runCatching { this.group(groupName) }.getOrNull() } + + // Let garbage collector handle the removal of entries in this list + inline fun weakReferenceList(): MutableSet = Collections.newSetFromMap(WeakHashMap()) } -- cgit