diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2023-11-11 12:44:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-11 12:44:59 +0100 |
commit | e914cabd155e0a7fded7b874cef219b904660ec1 (patch) | |
tree | ce37243f8537f21e78d46972fa76b2ded532d12f /src/main/java/at/hannibal2/skyhanni/test | |
parent | fb40235d00dcfa42ca6eb3b8dacec8138386260b (diff) | |
download | skyhanni-e914cabd155e0a7fded7b874cef219b904660ec1.tar.gz skyhanni-e914cabd155e0a7fded7b874cef219b904660ec1.tar.bz2 skyhanni-e914cabd155e0a7fded7b874cef219b904660ec1.zip |
tab list debug (#702)
Added /shdebugtablist - Set your clipboard as a fake tab list. #702
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt | 27 |
1 files changed, 0 insertions, 27 deletions
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<String>) { - val resultList = mutableListOf<String>() - 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 |