Skip to content

Commit

Permalink
Fix: UninitializedPropertyAccessException in UnknownLinesHandler (han…
Browse files Browse the repository at this point in the history
  • Loading branch information
j10a1n15 authored Aug 25, 2024
1 parent 2fd9abd commit 6e5f9d1
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object UnknownLinesHandler {
/**
* Remove known lines with patterns
**/
val patternsToExclude = listOf(
val patternsToExclude = mutableListOf(
PurseAPI.coinsPattern,
SbPattern.motesPattern,
BitsAPI.bitsScoreboardPattern,
Expand Down Expand Up @@ -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) }
}
Expand Down

0 comments on commit 6e5f9d1

Please sign in to comment.