aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorjani270 <69345714+jani270@users.noreply.github.com>2024-01-11 15:50:52 +0100
committerGitHub <noreply@github.com>2024-01-11 15:50:52 +0100
commit2e12fc657e03c26f26e61b5e9da939b23a73f528 (patch)
tree44a08f611a8f7560b7e784b158915f3d602a6b34 /src/main/java/at/hannibal2/skyhanni/utils
parent96cdf8e2aef9dbc025f431a81df0d5aa6f257dbb (diff)
downloadskyhanni-2e12fc657e03c26f26e61b5e9da939b23a73f528.tar.gz
skyhanni-2e12fc657e03c26f26e61b5e9da939b23a73f528.tar.bz2
skyhanni-2e12fc657e03c26f26e61b5e9da939b23a73f528.zip
Added-Lesser-Orb-of-Healing-Hider (#904)
Lesser Orb of Healing Hider. #904
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt8
1 files changed, 6 insertions, 2 deletions
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 <reified T> weakReferenceList(): MutableSet<T> = Collections.newSetFromMap(WeakHashMap<T, Boolean>())
}