From 536a5d6fbbf464e7a134453a6e93b74149933321 Mon Sep 17 00:00:00 2001 From: Alexia Luna Date: Thu, 4 Apr 2024 21:31:34 +0200 Subject: Backend: Add option to copy raw scoreboard (#1356) --- .../at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt index e0750c5a1..79076fe96 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt @@ -10,12 +10,14 @@ object CopyScoreboardCommand { fun command(args: Array) { val resultList = mutableListOf() - val noColor = args.size == 1 && args[0] == "true" + val noColor = args.contains("-nocolor") + val raw = args.contains("-raw") resultList.add("Title:") resultList.add(ScoreboardData.objectiveTitle.transformIf({ noColor }) { removeColor() }) resultList.add("") - for (line in ScoreboardData.sidebarLinesFormatted) { + val lines = if (raw) ScoreboardData.sidebarLinesRaw else ScoreboardData.sidebarLinesFormatted + for (line in lines) { val scoreboardLine = line.transformIf({ noColor }) { removeColor() } resultList.add("'$scoreboardLine'") } -- cgit