From e914cabd155e0a7fded7b874cef219b904660ec1 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Sat, 11 Nov 2023 12:44:59 +0100 Subject: tab list debug (#702) Added /shdebugtablist - Set your clipboard as a fake tab list. #702 --- .../skyhanni/test/command/CopyTabListCommand.kt | 27 ---------------------- 1 file changed, 27 deletions(-) delete mode 100644 src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt (limited to 'src/main/java/at/hannibal2/skyhanni/test') diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt deleted file mode 100644 index a4f287e5b..000000000 --- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt +++ /dev/null @@ -1,27 +0,0 @@ -package at.hannibal2.skyhanni.test.command - -import at.hannibal2.skyhanni.mixins.transformers.AccessorGuiPlayerTabOverlay -import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.LorenzUtils.conditionalTransform -import at.hannibal2.skyhanni.utils.LorenzUtils.transformIf -import at.hannibal2.skyhanni.utils.OSUtils -import at.hannibal2.skyhanni.utils.StringUtils.removeColor -import at.hannibal2.skyhanni.utils.TabListData -import net.minecraft.client.Minecraft - -object CopyTabListCommand { - fun command(args: Array) { - val resultList = mutableListOf() - val noColor = args.size == 1 && args[0] == "true" - for (line in TabListData.getTabList()) { - val tabListLine = line.transformIf({ noColor }) { removeColor() } - if (tabListLine != "") resultList.add("'$tabListLine'") - } - val tabList = Minecraft.getMinecraft().ingameGUI.tabList as AccessorGuiPlayerTabOverlay - val tabHeader = tabList.header_skyhanni.conditionalTransform(noColor, { unformattedText }, { formattedText }) - val tabFooter = tabList.footer_skyhanni.conditionalTransform(noColor, { unformattedText }, { formattedText }) - val string = "Header:\n\n$tabHeader\n\nBody:\n\n${resultList.joinToString("\n")}\n\nFooter:\n\n$tabFooter" - OSUtils.copyToClipboard(string) - LorenzUtils.chat("§e[SkyHanni] Tab list copied into the clipboard!") - } -} \ No newline at end of file -- cgit