# 🎁 Item Options

## Item Options

The plugin builds items in several places — the [hotbar items](../featues/hotbar-items.md), the entries of every [menu](../featues/menus.md), the two states of the PvP mode item and the teleport bow. They share most of their options, so what is on this page works in all of them unless a section says otherwise.

```yaml
    material: DIAMOND_SWORD
    amount: 1
    custom-model-data: 0
    item-model: ''
    glow: false
    hide-attributes: false
    display-name: '&bExample'
    lore:
    - '&7An example item.'
```

## Where each option works

Three groups of items exist, and the last two columns are the ones to check before writing an option that does nothing.

| Option                | Hotbar & custom items | Music & player settings menus |
| --------------------- | --------------------- | ----------------------------- |
| `material`            | Yes                   | Yes                           |
| `amount`              | Yes                   | Yes                           |
| `custom-model-data`   | Yes                   | Yes                           |
| `item-model`          | Yes                   | Yes                           |
| `tooltip-style`       | Yes                   | Yes                           |
| `glow`                | Yes                   | Yes                           |
| `hide-attributes`     | Yes                   | Yes                           |
| `display-name`, `lore`| Yes                   | Yes                           |
| `enchantments`        | Hotbar items only     | No                            |
| `hide-enchantments`   | Hotbar items only     | No                            |
| The [extras](#extras) below | No              | Yes                           |

"Custom items" here means the entries of `servers.yml`, `lobbies.yml` and any [menu you create](../featues/menus.md#custom-menus).

### The two built-in items

The [PvP mode item](../featues/hotbar-items.md#pvp-mode) and the [teleport bow](../featues/hotbar-items.md#teleport-bow) are written by hand rather than as normal entries, so they differ slightly:

* The PvP mode item's two states take `material`, `custom-model-data`, `item-model`, `tooltip-style`, `display-name`, `lore`, `enchantments` and `hide-enchantments`. They have no `glow` or `amount`.
* The teleport bow takes everything the hotbar items do. Its `glow` option changes nothing, because the bow always carries Infinity to fire without ammo being consumed, and that gives it the shimmer regardless.

## Material

The material is the Minecraft item name, such as `DIAMOND_SWORD` or `LIME_DYE`. A material your server version does not have leaves the slot empty, so check the name against the version you run.

Player heads have two forms of their own, covered under [Player Heads](../featues/hotbar-items.md#player-heads).

## Amount

How many of the item are in the stack. Anything below 1 is treated as 1.

## Resource Pack Options

Two options point an item at a custom model, and which one you use depends on your server version.

| Option              | Description                                                   |
| ------------------- | ------------------------------------------------------------- |
| `custom-model-data` | The number your resource pack predicate matches on. Leave it at 0 for none. |
| `item-model`        | The model to draw, as a namespaced key such as `mypack:ruby_sword` |
| `tooltip-style`     | The tooltip frame to draw behind the name and lore, as a namespaced key such as `mypack:legendary` |

```yaml
    material: DIAMOND_SWORD
    custom-model-data: 1001
```

```yaml
    material: DIAMOND_SWORD
    item-model: 'mypack:ruby_sword'
```

```yaml
    material: DIAMOND_SWORD
    tooltip-style: 'mypack:legendary'
```

A key without a namespace is read as a vanilla one, so write the namespace your pack uses. A style your pack does not define leaves the item with the normal tooltip.

> **Info:**
`item-model` and `tooltip-style` need Minecraft 1.21.2 or above. On an older server they are ignored and the item keeps its normal look, so a pack that has to cover both versions uses `custom-model-data`.

## Enchantments

Each entry is an enchantment and a level, separated by a colon. A level left out counts as 1.

```yaml
    enchantments:
    - 'SHARPNESS:5'
    - 'UNBREAKING:3'
    - 'MENDING'
```

An enchantment name your server does not recognise is skipped and the rest of the list still applies, so a typo costs you one enchantment rather than all of them.

## Hide Enchantments

Whether the enchantment lines are printed under the name. It is on by default, which is what keeps a decorated item looking clean in the hotbar.

> **Warning:**
This option hides more than the enchantments. With it on the item carries every hide flag, so attack damage, armour values, unbreakable and the rest are hidden too. Turning it off reveals the enchantment lines only — the attribute lines stay hidden either way.

## Glow

Gives the item the enchanted shimmer without an enchantment on it. It is applied by adding a hidden Unbreaking I, so an item that already carries `enchantments` of its own keeps those and ignores `glow`.

## Hide Attributes

Hides the attribute lines a weapon or a piece of armour prints, so a sword in a menu shows only the name and lore you wrote.

On a hotbar item this changes nothing, because `hide-enchantments` already hides those lines.

## Display Name and Lore

The name and the lines under it. Both accept the usual & colour codes, [MiniMessage](languages.md#rich-text-minimessage) tags and [PlaceholderAPI](../plugin-information/placeholders.md) placeholders.

Set `display-name` to `''` to leave the item with no name at all.

```yaml
    display-name: '&aGame Menu &7(Right Click)'
    lore:
    - '&7Click here to open the quick compass.'
    - ''
    - '&d%phoenixlobby_proxy_survival% &7currently playing!'
```

A lore line that reads a placeholder only updates when the item is rebuilt. In a menu that means turning on `refresh` in its [settings](../featues/menus.md#settings); in the hotbar it means the player rejoining or changing world.

## Extras

The [music](../featues/music.md) and [player settings](../featues/player-settings.md) menus are built on the newer menu system, so their items take a few more options. These are ignored everywhere else.

| Option                      | Description                                                    |
| --------------------------- | -------------------------------------------------------------- |
| `rgb`                       | Dyes leather armour, written as `255, 80, 0`                    |
| `trim-material`, `trim-pattern` | Puts an armour trim on a piece of armour, both needed      |
| `banner-meta`               | Banner patterns, each written as `COLOUR;PATTERN`               |
| `potion-effects`            | Effects on a potion, each written as `effect;duration;amplifier` |
| `enchantment-glint-override`| Forces the shimmer on or off, whatever the enchantments say     |
| `hide-tooltip`              | Hides the tooltip of the item completely                        |

```yaml
    material: LEATHER_CHESTPLATE
    rgb: '255, 80, 0'
    trim-material: REDSTONE
    trim-pattern: SENTRY
```

```yaml
    material: WHITE_BANNER
    banner-meta:
    - 'RED;STRIPE_SMALL'
    - 'BLACK;BORDER'
```

```yaml
    material: POTION
    potion-effects:
    - 'speed;600;1'
```

> **Info:**
A value these options cannot read — a trim material that does not exist, a malformed banner pattern — is skipped without an error, and the item is built without it.

> **Warning:**
`hide-tooltip` and `enchantment-glint-override` are Minecraft 1.21.2 features and do nothing on an older server.

Source: https://www.phoenixplugins.com/docs/phoenix-lobby/configurations/item-options