aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/test/command
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-15 10:36:57 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-15 10:36:57 +0200
commit5eae6a82b10cca07f3148f4d831ce285051634ca (patch)
treeae669f050b2f2aa8caeb3fde92dac7c07919d656 /src/main/java/at/hannibal2/skyhanni/test/command
parentb1a2491e9a84b8a4a6261b43f97d3a907d979f06 (diff)
downloadskyhanni-5eae6a82b10cca07f3148f4d831ce285051634ca.tar.gz
skyhanni-5eae6a82b10cca07f3148f4d831ce285051634ca.tar.bz2
skyhanni-5eae6a82b10cca07f3148f4d831ce285051634ca.zip
Added /shcopyinternalname and hotkey to copy internal names of items
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test/command')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt4
1 files changed, 2 insertions, 2 deletions
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 d2f0b60ab..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.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()