diff options
author | Alexia Luna <me@alexia.lol> | 2024-04-04 21:31:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-04 21:31:34 +0200 |
commit | 536a5d6fbbf464e7a134453a6e93b74149933321 (patch) | |
tree | 7f4c03a2001f133837bde2d89a9643872db7703c /src/main/java/at/hannibal2 | |
parent | 52691f7a79adc3f661f82a0833fe1ca132c6412d (diff) | |
download | skyhanni-536a5d6fbbf464e7a134453a6e93b74149933321.tar.gz skyhanni-536a5d6fbbf464e7a134453a6e93b74149933321.tar.bz2 skyhanni-536a5d6fbbf464e7a134453a6e93b74149933321.zip |
Backend: Add option to copy raw scoreboard (#1356)
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt | 6 |
1 files changed, 4 insertions, 2 deletions
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<String>) { val resultList = mutableListOf<String>() - 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'") } |