> For the complete documentation index, see [llms.txt](https://docs.xshyo.us/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xshyo.us/premium-plugins/shopmaster/item-creation.md).

# item Creation

🛒 ShopMaster - Item Creation Guide

This guide explains how to create and configure items for your shops using the **ShopMaster** plugin. It includes detailed examples and advanced customization options for various item types.

***

## 📦 Basic Item Structure

Each item is defined under a unique ID within a specific shop section.

```yaml
<shopName>:
  items:
    1:  # Unique item ID
      item:
        material: DIAMOND_SWORD       # Minecraft material
        quantity: 1                   # Number of items
        name: "&bMagic Sword"         # Display name (supports color codes)
        lore:                         # Item description
          - "&7A powerful sword"
          - "&7that deals extra damage"
      page: 1                         # Shop GUI page number
      slot: 10                        # Inventory slot position
      economy: VAULT                 # Economy type (e.g., VAULT, TOKENS)
      buyPrice: 100                  # Buy price (-1 to disable)
      sellPrice: 50                  # Sell price (-1 to disable)
```

***

## 🎯 Slot Configuration

ShopMaster supports flexible slot placement:

### Single Slot

```yaml
slot: 10
```

### Multiple Slots

```yaml
slots:
  - 10
  - 11
  - 12
```

### Slot Range

```yaml
slot: "10-15"
```

### Mixed Format

```yaml
slots:
  - "10-15"
  - 20
  - "22-24"
```

***

## ✨ Advanced Item Features

### Enchantments

```yaml
item:
  enchantments:
    SHARPNESS: 5
    UNBREAKING: 3
```

### Item Flags

```yaml
item:
  flags:
    - HIDE_ATTRIBUTES
    - HIDE_ENCHANTS
```

***

## 💰 Buy/Sell Commands

Run commands when a player buys or sells an item:

### Buy Commands

```yaml
buy_commands:
  - "[command] give %player_name% diamond 5"
  - "[command] broadcast %player_name% bought a special item!"
```

### Sell Commands

```yaml
sell_commands:
  - "[command] eco give %player_name% 100"
  - "[command] say %player_name% sold an item!"
```

***

## 🧪 Special Item Configurations

### Potions

```yaml
item:
  material: POTION
  potion:
    type: STRENGTH
    extended: true
    upgraded: false
    custom_effects:
      1:
        type: REGENERATION
        duration: 200
        amplifier: 1
```

### Spawners

```yaml
item:
  material: SPAWNER
  mob: ZOMBIE
```

### Banners

```yaml
item:
  material: WHITE_BANNER
  banner:
    patterns:
      1:
        pattern: BORDER
        color: BLACK
      2:
        pattern: SKULL
        color: RED
```

### Firework Rockets

```yaml
item:
  material: FIREWORK_ROCKET
  firework:
    power: 3
    effects:
      1:
        type: BALL_LARGE
        flicker: true
        trail: true
        colors:
          - "255,0,0"
          - "0,255,0"
        fade_colors:
          - "0,0,255"
```

### Colored Armor

```yaml
item:
  material: LEATHER_CHESTPLATE
  armor_color: "255,0,0"
```

### Armor Trim

```yaml
item:
  material: DIAMOND_HELMET
  trim:
    pattern: DUNE
    material: GOLD
```

### Tipped Arrows

```yaml
item:
  material: TIPPED_ARROW
  arrow_potion:
    type: POISON
    extended: true
    upgraded: false
    custom_effects:
      1:
        type: SLOWNESS
        duration: 200
        amplifier: 1
```

### Crossbows with Loaded Projectiles

```yaml
item:
  material: CROSSBOW
  loaded_projectiles:
    1:
      material: TIPPED_ARROW
      quantity: 1
      potion:
        type: INSTANT_DAMAGE
        extended: false
        upgraded: true
```

### Axolotl Buckets

```yaml
item:
  material: AXOLOTL_BUCKET
  axolotl:
    variant: BLUE
```

***

## 🙈 Hidden Items

You can create items that are only visible to players with specific permissions:

```yaml
item:
  material: NETHERITE_SWORD
hidden: true
```

***

### ⚙️ Additional Options

#### Item Restrictions

You can restrict which items can be sold to the shop using the `config.yml` file.

#### Multiple Economies

ShopMaster supports various economy systems:

| Type   | Description                   |
| ------ | ----------------------------- |
| VAULT  | Default money system          |
| TOKENS | Integration with TokenManager |
| POINTS | Integration with PlayerPoints |

***

### 🧩 Custom Item Support

ShopMaster is compatible with custom items from popular plugins such as:

* MMOItems
* ItemsAdder
* Oraxen
* ExecutableItems
* BreweryX (for custom potions)

***

### 🧪 Complete Example

```yaml
shops:
  weapons:
    items:
      1:
        item:
          material: DIAMOND_SWORD
          quantity: 1
          name: "&b☆ Frost Blade ☆"
          lore:
            - "&7A legendary sword forged in"
            - "&7the depths of an ice cavern"
          enchantments:
            SHARPNESS: 5
            FIRE_ASPECT: 2
          flags:
            - HIDE_ATTRIBUTES
        page: 1
        slot: 13
        economy: VAULT
        buyPrice: 5000
        sellPrice: 2500
        buy_commands:
          - "[command] tell %player_name% You've purchased the legendary Frost Blade!"
```

***

### 🔁 Reloading Changes

After editing your shop configuration files, **reload the plugin** with the following command:

```bash
/adminshop reload
```
