aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorAlexia Luna <me@alexia.lol>2024-04-04 21:31:34 +0200
committerGitHub <noreply@github.com>2024-04-04 21:31:34 +0200
commit536a5d6fbbf464e7a134453a6e93b74149933321 (patch)
tree7f4c03a2001f133837bde2d89a9643872db7703c /src/main/java/at/hannibal2
parent52691f7a79adc3f661f82a0833fe1ca132c6412d (diff)
downloadskyhanni-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.kt6
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'")
}