diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-16 12:34:18 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-16 12:34:18 +0200 |
| commit | 4293cfd919c3c93d4532534f722c407d7ad1370d (patch) | |
| tree | f9f612f021ef7f4283d74312edfaca30badc6749 /src/main/java/at/hannibal2/skyhanni/test/command | |
| parent | 538e3ceb76f8e0b590291ce9aa90aa94896cdcb6 (diff) | |
| parent | 024ba52fb69b6cd44b4e31542867f802de656f15 (diff) | |
| download | SkyHanni-cum.tar.gz SkyHanni-cum.tar.bz2 SkyHanni-cum.zip | |
Merge branch 'beta' into cumcum
# Conflicts:
# src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt
# src/main/java/at/hannibal2/skyhanni/config/features/AshfangConfig.java
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test/command')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt | 4 | ||||
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt index 946255996..dd830571f 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt @@ -42,6 +42,10 @@ object CopyErrorCommand { } ?: "§c[SkyHanni] Error id not found!") } + fun logErrorState(userMessage: String, internalMessage: String) { + logError(IllegalStateException(internalMessage), userMessage) + } + fun logError(throwable: Throwable, message: String) { val error = Error(message, throwable) Minecraft.getMinecraft().thePlayer ?: throw error diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt index 2b33c8e82..4fc82bbc3 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt @@ -1,18 +1,18 @@ package at.hannibal2.skyhanni.test.command -import at.hannibal2.skyhanni.test.SkyHanniTestCommand +import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests +import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.OSUtils -import net.minecraft.client.Minecraft object CopyItemCommand { fun command(args: Array<String>) { try { val resultList = mutableListOf<String>() - val itemStack = Minecraft.getMinecraft().thePlayer.inventory.getCurrentItem()!! + val itemStack = InventoryUtils.getItemInHand() ?: return resultList.add("ITEM LORE") resultList.add("display name: '" + itemStack.displayName.toString() + "'") val itemID = itemStack.getInternalName_old() @@ -32,7 +32,7 @@ object CopyItemCommand { resultList.add("") resultList.add("ExtraAttributes") val extraAttributes = tagCompound.getCompoundTag("ExtraAttributes") - SkyHanniTestCommand.runn(extraAttributes, " . ") + SkyHanniDebugsAndTests.runn(extraAttributes, " . ") } } |
