diff options
| author | Roman / Linnea Gräf <nea@nea.moe> | 2023-05-15 22:50:48 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-05-17 10:50:22 +0200 |
| commit | 55d6bfc64f0a2ef36aebbcc49dabfa4128612895 (patch) | |
| tree | ea348b0e822d35fbaf2bbea653857848c45abdbb /src/main/java/at/hannibal2/skyhanni/test | |
| parent | 29dfcf213f1183ca382d8d7604a08e914e0918c2 (diff) | |
| download | skyhanni-55d6bfc64f0a2ef36aebbcc49dabfa4128612895.tar.gz skyhanni-55d6bfc64f0a2ef36aebbcc49dabfa4128612895.tar.bz2 skyhanni-55d6bfc64f0a2ef36aebbcc49dabfa4128612895.zip | |
Fix compile errors introduced in 068cc5db57af16b25dd5115498ddf0e6f1fc… (#109)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt | 13 |
1 files changed, 8 insertions, 5 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 index fc41c4009..c5c94b8a2 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.test.command +import at.hannibal2.skyhanni.mixins.transformers.AccessorGuiPlayerTabOverlay import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.OSUtils import at.hannibal2.skyhanni.utils.StringUtils.removeColor @@ -15,14 +16,16 @@ object CopyTabListCommand { val tabListLine = if (noColor) line.removeColor() else line if (tabListLine != "") resultList.add("'$tabListLine'") } - val tabHeader = Minecraft.getMinecraft().ingameGUI.tabList.header.formattedText - val tabFooter = Minecraft.getMinecraft().ingameGUI.tabList.footer.formattedText - val string = "Header:\n\n" + tabHeader.toString() + "\n\nBody:\n\n" + resultList.joinToString("\n") + "\nFooter:\n\n" + tabFooter.toString() + val tabList = Minecraft.getMinecraft().ingameGUI.tabList as AccessorGuiPlayerTabOverlay + val tabHeader = tabList.header_skyhanni.formattedText + val tabFooter = tabList.footer_skyhanni.formattedText + val string = "Header:\n\n$tabHeader\n\nBody:\n\n${resultList.joinToString("\n")}\nFooter:\n\n$tabFooter" OSUtils.copyToClipboard(string) - LorenzUtils.chat("§e[SkyHanni] tablist copied into the clipboard!") + LorenzUtils.chat("§e[SkyHanni] Tab list copied into the clipboard!") } catch (_: Throwable) { - LorenzUtils.chat("§c[SkyHanni] Nothing in tablist") + // TODO: Note: why are we ignoring this exception? This user facing error message seems out of place to me + LorenzUtils.chat("§c[SkyHanni] Nothing in tab list") } } }
\ No newline at end of file |
