diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-21 21:00:04 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-21 21:00:04 +0200 |
commit | 3348fc30feb4a4c2d375e87de4b028d6fb4b58c5 (patch) | |
tree | 345d74b8006d355515fd88a63731d01f6a5f3e92 /src/main | |
parent | 7efb8034e57ea845f7464a467e2beff3684d6fe1 (diff) | |
download | skyhanni-3348fc30feb4a4c2d375e87de4b028d6fb4b58c5.tar.gz skyhanni-3348fc30feb4a4c2d375e87de4b028d6fb4b58c5.tar.bz2 skyhanni-3348fc30feb4a4c2d375e87de4b028d6fb4b58c5.zip |
added /shdebugdata
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt | 4 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/SkyHanniTestCommand.kt | 42 |
2 files changed, 45 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index 9e5082f37..b2023d7aa 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -161,6 +161,10 @@ object Commands { "shconfig", "Search or reset config elements §c(warning, dangerous!)" ) { SkyHanniConfigSearchResetCommand.command(it) } + registerCommand( + "shdebugdata", + "Prints debug data in the clipboard" + ) { SkyHanniTestCommand.debugData(it) } } private fun developersDebugFeatures() { diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniTestCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniTestCommand.kt index 0ec54b3a0..0597168be 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniTestCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniTestCommand.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.test import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.PlaySoundEvent @@ -166,6 +167,43 @@ class SkyHanniTestCommand { OSUtils.copyToClipboard("LorenzVec($x, $y, $z)") } + + fun debugData(args: Array<String>) { + if (args.size == 2) { + if (args[0] == "profileName") { + HypixelData.profileName = args[1].lowercase() + LorenzUtils.chat("§eManually set profileName to '${HypixelData.profileName}'") + return + } + } + val builder = StringBuilder() + builder.append("```\n") + builder.append("= Debug Information = \n") + builder.append("\n") + builder.append("SkyHanni ${SkyHanniMod.version}\n") + builder.append("\n") + builder.append("player name: '${LorenzUtils.getPlayerName()}'\n") + builder.append("player uuid: '${LorenzUtils.getPlayerUuid()}'\n") + builder.append("\n") + builder.append("onHypixel: ${LorenzUtils.onHypixel}\n") + val inSkyBlock = LorenzUtils.inSkyBlock + builder.append("inSkyBlock: $inSkyBlock\n") + builder.append("\n") + if (inSkyBlock) { + builder.append("skyBlockIsland: ${LorenzUtils.skyBlockIsland}\n") + builder.append("skyBlockArea: '${LorenzUtils.skyBlockArea}'\n") + builder.append("profileName: '${HypixelData.profileName}'\n") + builder.append("\n") + builder.append("ironman: ${HypixelData.ironman}\n") + builder.append("stranded: ${HypixelData.stranded}\n") + builder.append("bingo: ${HypixelData.bingo}\n") + + } + builder.append("\n") + builder.append("```") + OSUtils.copyToClipboard(builder.toString()) + LorenzUtils.chat("§eCopied SkyHanni debug data to clipboard.") + } } @SubscribeEvent @@ -189,7 +227,9 @@ class SkyHanniTestCommand { if (!LorenzUtils.inSkyBlock) return if (!SkyHanniMod.feature.dev.debugEnabled) return - SkyHanniMod.feature.dev.debugPos.renderString(displayLine, posLabel = "Test") + if (displayLine.isNotEmpty()) { + SkyHanniMod.feature.dev.debugPos.renderString("test: $displayLine", posLabel = "Test") + } SkyHanniMod.feature.dev.debugPos.renderStringsAndItems(displayList, posLabel = "Test Display") } |