summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/test
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-27 12:32:23 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-27 12:32:23 +0200
commit91a4c759d9b20c3026c89a0fa0da29fd4967f7e2 (patch)
treea81f8867850a15bec675d80fdf8a41de667dbdac /src/main/java/at/hannibal2/skyhanni/test
parent23b12864f115c4cd37a48b01afdb093732dd5a12 (diff)
downloadskyhanni-91a4c759d9b20c3026c89a0fa0da29fd4967f7e2.tar.gz
skyhanni-91a4c759d9b20c3026c89a0fa0da29fd4967f7e2.tar.bz2
skyhanni-91a4c759d9b20c3026c89a0fa0da29fd4967f7e2.zip
code cleanup and removed code duplication
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt2
2 files changed, 3 insertions, 3 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 c4c262f0a..bcc0cfc35 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt
@@ -11,11 +11,11 @@ object CopyScoreboardCommand {
val resultList = mutableListOf<String>()
val noColor = args.size == 1 && args[0] == "true"
resultList.add("Title:")
- resultList.add(ScoreboardData.objectiveTitle.transformIf(noColor) { removeColor() })
+ resultList.add(ScoreboardData.objectiveTitle.transformIf({noColor}) { removeColor() })
resultList.add("")
for (line in ScoreboardData.sidebarLinesFormatted) {
- val scoreboardLine = line.transformIf(noColor) { removeColor() }
+ val scoreboardLine = line.transformIf({noColor}) { removeColor() }
resultList.add("'$scoreboardLine'")
}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt
index 9a745cc11..a4f287e5b 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt
@@ -14,7 +14,7 @@ object CopyTabListCommand {
val resultList = mutableListOf<String>()
val noColor = args.size == 1 && args[0] == "true"
for (line in TabListData.getTabList()) {
- val tabListLine = line.transformIf(noColor) { removeColor() }
+ val tabListLine = line.transformIf({ noColor }) { removeColor() }
if (tabListLine != "") resultList.add("'$tabListLine'")
}
val tabList = Minecraft.getMinecraft().ingameGUI.tabList as AccessorGuiPlayerTabOverlay