diff options
author | J10a1n15 <45315647+j10a1n15@users.noreply.github.com> | 2024-03-17 18:40:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-17 18:40:02 +0100 |
commit | 5d5ec603043c1123ebc389329684bc189ec82350 (patch) | |
tree | 0b0d792f81a2dfea6050d8706f234a9f06058daf /src/main/java/at | |
parent | cfc485271278e46e66f219a0d923373b90aba9f4 (diff) | |
download | skyhanni-5d5ec603043c1123ebc389329684bc189ec82350.tar.gz skyhanni-5d5ec603043c1123ebc389329684bc189ec82350.tar.bz2 skyhanni-5d5ec603043c1123ebc389329684bc189ec82350.zip |
Fix: Fixed Custom Scoreboard Dungeon Problems (#1199)
Diffstat (limited to 'src/main/java/at')
3 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt index d0524fd4d..58ca7ef4f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt @@ -399,13 +399,11 @@ private fun getIslandDisplayPair() = listOf("§7㋖ §a" + HypixelData.skyBlockIsland.displayName to HorizontalAlignment.LEFT) private fun getLocationDisplayPair() = buildList { - add( - getGroupFromPattern( - ScoreboardData.sidebarLinesFormatted, - ScoreboardPattern.locationPattern, - "location" - ).trim() to HorizontalAlignment.LEFT - ) + val location = + getGroupFromPattern(ScoreboardData.sidebarLinesFormatted, ScoreboardPattern.locationPattern, "location").trim() + if (location == "0") return@buildList + + add(location to HorizontalAlignment.LEFT) ScoreboardData.sidebarLinesFormatted.firstOrNull { ScoreboardPattern.plotPattern.matches(it) } ?.let { add(it to HorizontalAlignment.LEFT) } diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt index dfe5a0d3a..636433ccc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt @@ -190,7 +190,7 @@ private fun getDungeonsLines() = listOf( SbPattern.floor3GuardiansPattern ).let { patterns -> // BetterMap adds a random §r at the start, making it go black - getSbLines().filter { line -> patterns.any { it.matches(line.replace("§r", "")) } } + getSbLines().filter { line -> patterns.any { it.matches(line) } }.map { it.removePrefix("§r") } } private fun getDungeonsShowWhen(): Boolean { diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/UnknownLinesHandler.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/UnknownLinesHandler.kt index 397aa713a..3c77cd248 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/UnknownLinesHandler.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/UnknownLinesHandler.kt @@ -43,6 +43,7 @@ object UnknownLinesHandler { SbPattern.soloPattern, SbPattern.teammatesPattern, SbPattern.floor3GuardiansPattern, + SbPattern.m7dragonsPattern, SbPattern.wavePattern, SbPattern.tokensPattern, SbPattern.submergesPattern, |