aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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'")
}