aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ10a1n15 <45315647+j10a1n15@users.noreply.github.com>2024-08-26 00:00:43 +0200
committerGitHub <noreply@github.com>2024-08-26 00:00:43 +0200
commit6e5f9d154ed072ead75f5c44b9dd1988e94f88a6 (patch)
tree1c7677a7c370e173d2d24672ffadd37a6bd55077
parent2fd9abda245a6e64e8246e498377cba9830fd62d (diff)
downloadskyhanni-6e5f9d154ed072ead75f5c44b9dd1988e94f88a6.tar.gz
skyhanni-6e5f9d154ed072ead75f5c44b9dd1988e94f88a6.tar.bz2
skyhanni-6e5f9d154ed072ead75f5c44b9dd1988e94f88a6.zip
Fix: UninitializedPropertyAccessException in UnknownLinesHandler (#2407)
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/UnknownLinesHandler.kt7
1 files changed, 5 insertions, 2 deletions
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 bbae099d6..e77f670b7 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
@@ -27,7 +27,7 @@ object UnknownLinesHandler {
/**
* Remove known lines with patterns
**/
- val patternsToExclude = listOf(
+ val patternsToExclude = mutableListOf(
PurseAPI.coinsPattern,
SbPattern.motesPattern,
BitsAPI.bitsScoreboardPattern,
@@ -134,9 +134,12 @@ object UnknownLinesHandler {
SbPattern.carnivalCatchStreakPattern,
SbPattern.carnivalAccuracyPattern,
SbPattern.carnivalKillsPattern,
- *remoteOnlyPatterns,
)
+ if (::remoteOnlyPatterns.isInitialized) {
+ patternsToExclude.addAll(remoteOnlyPatterns)
+ }
+
unknownLines = unknownLines.filterNot { line ->
patternsToExclude.any { pattern -> pattern.matches(line) }
}