aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJ10a1n15 <45315647+j10a1n15@users.noreply.github.com>2024-03-29 15:47:58 +0100
committerGitHub <noreply@github.com>2024-03-29 15:47:58 +0100
commit903d2605a90f541df96129bb30ea9bbe084385f7 (patch)
tree45d00fc11e7f14418c9660b5b98579982e354184 /src
parentb98cfd9c8a6da8d24063e37f9e333de5abe0681f (diff)
downloadskyhanni-903d2605a90f541df96129bb30ea9bbe084385f7.tar.gz
skyhanni-903d2605a90f541df96129bb30ea9bbe084385f7.tar.bz2
skyhanni-903d2605a90f541df96129bb30ea9bbe084385f7.zip
Technical Improvement: Use RepoPattern for inSkyBlock check (#1312)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
index 9ab6993d2..b38638af6 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
@@ -78,6 +78,10 @@ class HypixelData {
"guesting.scoreboard",
"SKYBLOCK GUEST"
)
+ private val scoreboardTitlePattern by patternGroup.pattern(
+ "scoreboard.title",
+ "SK[YI]BLOCK"
+ )
var hypixelLive = false
var hypixelAlpha = false
@@ -401,7 +405,6 @@ class HypixelData {
val objective = world.scoreboard.getObjectiveInDisplaySlot(1) ?: return false
val displayName = objective.displayName
val scoreboardTitle = displayName.removeColor()
- return scoreboardTitle.contains("SKYBLOCK") ||
- scoreboardTitle.contains("SKIBLOCK") // April 1st jokes are so funny
+ return scoreboardTitlePattern.matches(scoreboardTitle)
}
}