summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/test/command
diff options
context:
space:
mode:
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()