# 📰 Reward Config Editing

> **Danger:**
If you copy and paste a reward, make sure to change its identifier, as it must be unique.

## Edit Rewards

You can also edit the rewards through the configuration file if you prefer to manage everything manually.

## Format:

The following option is the method you can use for vanilla items. \
**Note:** This option cannot be configured through the in-game editor, as the editor uses the bukkit format to also support custom properties and modded Items.

```yaml
display-item:
  material: PAPER
win-items:
  '0':
    material: PAPER
```

## Material:

Allows you to set a material on your item.

> ```yaml
> material: TEXT
> ```
>
> > **Supported material values:**
> >
> > * Vanilla (`DIAMOND`).
> > * [HeadDatabase ](https://www.spigotmc.org/resources/head-database.14280)(`hdb:id`)
> > * [ItemsAdder](https://www.spigotmc.org/resources/%E2%9C%A8itemsadder%E2%AD%90emotes-mobs-items-armors-hud-gui-emojis-blocks-wings-hats-liquids.73355) (`itemsadder:namespace:id`)
> > * [Nexo](https://mcmodels.net/products/13172/nexo?srsltid=AfmBOoocUPY8FdXiOkDqM4Rml1Gs449TBz0x_FoKwJBgG8IYvkvMNJ2H) (`nexo:id`)
> > * [Mythic Items](https://mythiccraft.io/index.php?ewr-porta) (`mythicitem:id`)
> > * [MMOItems](https://www.spigotmc.org/resources/%EF%B8%8F%E2%9A%94%EF%B8%8F-mmoitems-%E2%9A%94%EF%B8%8F-items-weapons-armor-sets-tiers-editor-gui-skills.39267) (`mmoitem:type:id` )
> > * [ExecutableItems](https://www.spigotmc.org/resources/%E2%9A%94%EF%B8%8Fexecutableitems-%E2%AD%90-customize-all-items-add-abilities-%E2%AD%90-ai-items-generation-on-the-discord-%E2%9C%85.83070) (`executableitem:id`)
> > * [CraftEngine](https://modrinth.com/plugin/craftengine) (`craftengine:id`)
> >
> > > - [Materials Link](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html)

> **Info:**
For hooked items (ItemsAdder, Nexo, MMOItems, ExecutableItems, CraftEngine, etc.), the `id` is the custom item's own identifier as registered in that plugin.

## Hooked Materials

A hooked material is the hook name, a colon, then the id the other plugin knows the item by. Only the first colon separates the two, so everything after it reaches that plugin exactly as written.

> **Danger:**
The separator is a colon, never a dash. `itemsadder-medieval_crates-crate_key` is read as a plain material name, matches none, and is reported as an unknown material in the console. The hook is never reached. The same value written with colons resolves.

| Hook            | Value                    | Example                              |
| --------------- | ------------------------ | ------------------------------------ |
| ItemsAdder      | `itemsadder:namespace:id`| `itemsadder:medieval_crates:crate_key` |
| MMOItems        | `mmoitem:type:id`        | `mmoitem:SWORD:cutlass`              |
| Nexo            | `nexo:id`                | `nexo:ruby_sword`                    |
| CraftEngine     | `craftengine:id`         | `craftengine:default:ruby_sword`     |
| Mythic Items    | `mythicitem:id`          | `mythicitem:excalibur`               |
| ExecutableItems | `executableitem:id`      | `executableitem:magic_wand`          |
| HeadDatabase    | `hdb:id`                 | `hdb:1234`                           |

ItemsAdder and MMOItems ids are built from two parts of their own, so those values have three parts in total. `itemsadder:crate_key` sends only `crate_key` to ItemsAdder and resolves to nothing, and an MMOItems value with no type is rejected. For the rest, pass the id exactly as the plugin registers it, namespace included where it has one.

> ```yaml
> material: itemsadder:medieval_crates:crate_key
> ```

The same values work in every `material` field of the plugin, the [menus](../configurations/customize-menus.md#item-material) included.

> **Info:**
When the hook name is valid but the plugin is not installed, or the id resolves to nothing, the item becomes a placeholder rather than the crate failing to load. On a reward it names the hook in its lore, in a menu it is a barrier.

## Display Name

Allows you to set a display name on your item.

> ```yaml
> display-name: '&eExample Reward'
> ```

> **Success:**
This option also supports [MiniMessage](https://docs.advntr.dev/minimessage/format) Format.

## Lore:

Allows you to set a custom lore on your item.

> ```yaml
> lore:
> - '&cLine 1'
> - '&eLine 2'
> - '&aLine 3'
> ```

> **Success:**
This option also supports [MiniMessage](https://docs.advntr.dev/minimessage/format) Format.

## Model Data:

Allows you to set custom model data on your item.

> ```yaml
> model-data: 1000
> ```

## Item Model:

Allows you to set a custom [Item Model](https://minecraft.wiki/w/Items_model_definition) (the modern resource-pack item model component) on your item.

> ```yaml
> item-model: 'minecraft:custom_paper'
> ```

> **Warning:**
This option requires the resource pack to actually define the referenced item model. If the model doesn't exist, the item will simply render with its base material's texture.

## Amount:

Allows you to set a fixed stack size on your item.

> ```yaml
> amount: 1
> ```

## Enchants:

Allows you to set enchants on your item.

> ```yaml
> enchants:
> - 'PROTECTION:1'
> - 'UNBREAKING:1'
> ```
>
> > * [Enchantsments Link](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html)

## Item Flags:

Allows you to set item flags on your item, to hide certain tooltip sections (enchants, attributes, "unbreakable", etc).

> ```yaml
> flags:
> - 'HIDE_ENCHANTS'
> ```
>
> > * [Item Flags Link](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/ItemFlag.html)

## Tooltip Style:

Allows you to set a custom tooltip style/texture (resource-pack defined) for the item's tooltip box.

> ```yaml
> tooltip-style: 'minecraft:gui/sprites/widget/inventory_tooltip'
> ```

> **Warning:**
Requires server version **1.21.2+**. On older server versions this option is ignored.

## Enchantment Glint Override:

Allows you to force the enchantment glint (the shimmering/glowing effect) on or off, independently of whether the item is actually enchanted.

> ```yaml
> enchantment-glint-override: true # Boolean (`true`/`false`)
> ```

> **Warning:**
Requires server version **1.20.5+**. On older server versions this option is ignored.

## Banner Meta:

Allows you to add banner patterns to your item. Works on banners, and on shields (and other blocks that carry banner data).

> ```yaml
> banner-meta:
> - 'RED;STRIPE_BOTTOM'
> - 'WHITE;CROSS'
> ```
>
> > * Each entry follows the format `<DyeColor>;<PatternType>`.
> > * [DyeColor Link](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/DyeColor.html) / [PatternType Link](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/block/banner/PatternType.html)

## Armor Trim (Material & Pattern):

Allows you to apply an armor trim to your item, by setting both the trim material and the trim pattern.

> ```yaml
> trim-material: IRON
> trim-pattern: DUNE
> ```
>
> > * Both options must be set together.
> > * [Armor Trim Materials](https://minecraft.wiki/w/Smithing#Trim_materials) / [Armor Trim Patterns](https://minecraft.wiki/w/Smithing#Trim_patterns)

> **Warning:**
Requires server version **1.20+**. On older server versions this option is ignored.

## Potion Effects:

Allows you to add custom potion effects to a potion item.

> ```yaml
> potion-effects:
> - 'speed;1200;1'
> - 'regeneration;600;0'
> ```
>
> > * Each entry follows the format `<PotionEffectType>;<duration in ticks>;<amplifier>`.
> > * [Potion Effect Types Link](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html)

## RGB:

Allows you to set a custom color on your item, using raw RGB values.

> ```yaml
> rgb: '38, 192, 210'
> ```
>
> > * Format: `R, G, B` (each `0`-`255`). Applies to leather armor, potions, maps and firework effects.

### Item Config Example

The following is an example of a reward with its display item and the actual reward.

```yaml
  '2':
    identifier: reward_1759509999284
    display-item:
      material: PAPER
      # Legacy colors support
      display-name: '&#C00BD6Paper'
      lore: 
      - '&cCustom Paper Item'
      model-data: 1000
      enchants:
      - 'PROTECTION:1'
      flags:
      - 'HIDE_ENCHANTS'
    win-items:
      '0':
        material: PAPER
        # Mini Message Support
        display-name: '<gradient:#C00BD6:#FD2177>Paper</gradient>'
        lore: 
        - '<gradient:#C00BD6:#FD2177>Custom Paper Item</gradient>'
        model-data: 1000
        enchants:
        - 'PROTECTION:1'
        flags:
        - 'HIDE_ENCHANTS'
```

Source: https://www.phoenixplugins.com/docs/phoenix-crates/main-features/reward-config-editing