> For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/itemstack.md).

# itemstack

## ItemStack

`ItemStack` represents an item with its properties, durability, and metadata.

| property      | type      | description                   |
| ------------- | --------- | ----------------------------- |
| type          | `String`  | item class name               |
| name          | `String`  | registry name                 |
| displayName   | `String`  | display name                  |
| stackSize     | `int`     | current stack size            |
| maxStackSize  | `int`     | max stack size                |
| durability    | `int`     | remaining durability          |
| maxDurability | `int`     | max durability                |
| isBlock       | `boolean` | `true` if the item is a block |
| meta          | `int`     | item metadata                 |

### constructor

creates a new item stack from a registry name.

```java
ItemStack stack = new ItemStack(String name);
```

***

### getEnchantments

returns a list of enchantments on the item.

```java
List<Object[]> enchantments = stack.getEnchantments();
```

***

### getTooltip

returns the item's tooltip as a list of strings.

```java
List<String> tooltip = stack.getTooltip();
```
