ItemObject
An item is a dict-like object with version-normalized properties. nbt contains raw version-dependent data.
Methods
Section titled “Methods”item.take()
Section titled “item.take()”Removes the item from its original player’s inventory and returns the ItemObject that was taken. Available on Minecraft 1.4.2 and later. Before Minecraft 1.8, it uses /clear by item ID and count instead of an exact slot operation, so identical stacks may be affected.
Attributes
Section titled “Attributes”| Attribute | Type | Description |
|---|---|---|
item.slot | str | Slot identifier such as hotbar.0, armor.head or inventory.0 |
item.id | str | Item identifier |
item.count | int | Item quantity |
item.damage | int | Durability/damage value |
item.custom_name | str / None | Custom display name |
item.lore | list | Display lore lines |
item.enchantments | dict / list | Enchantment entries; representation depends on the NBT source and version-normalization path |
item.attribute_modifiers | list | Attribute modifier entries |
item.nbt | dict | Raw item NBT/components; structure varies by Minecraft version |