From 91a4c759d9b20c3026c89a0fa0da29fd4967f7e2 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 27 Sep 2023 12:32:23 +0200 Subject: code cleanup and removed code duplication --- .../java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt | 4 ++-- .../java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/test/command') 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() 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() 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 -- cgit