From 52afdbf62ef5c35403132696918b9cfcc8faffdb Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Thu, 4 Apr 2024 20:32:01 +0200 Subject: Backend: error manager only for beta users (#1299) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../features/gui/customscoreboard/ScoreboardElements.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') 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 744b4fa45..d3e3b6c1c 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 @@ -807,16 +807,18 @@ private fun getFooterDisplayPair() = listOf( private fun getExtraDisplayPair(): List { if (unknownLines.isEmpty()) return listOf("" to HorizontalAlignment.LEFT) - if (amountOfUnknownLines != unknownLines.size && devConfig.unknownLinesWarning) { + val size = unknownLines.size + if (amountOfUnknownLines != size && devConfig.unknownLinesWarning) { + val message = "CustomScoreboard detected ${pluralize(unknownLines.size, "unknown line", withNumber = true)}" ErrorManager.logErrorWithData( - CustomScoreboardUtils.UndetectedScoreboardLines("CustomScoreboard detected ${pluralize(unknownLines.size, "unknown line", withNumber = true)}"), - "CustomScoreboard detected ${pluralize(unknownLines.size, "unknown line", withNumber = true)}", + CustomScoreboardUtils.UndetectedScoreboardLines(message), + message, "Unknown Lines" to unknownLines, "Island" to HypixelData.skyBlockIsland, "Area" to HypixelData.skyBlockArea, - noStackTrace = true + noStackTrace = true, ) - amountOfUnknownLines = unknownLines.size + amountOfUnknownLines = size } return listOf("§cUndetected Lines:" to HorizontalAlignment.LEFT) + unknownLines.map { it to HorizontalAlignment.LEFT } -- cgit