> For the complete documentation index, see [llms.txt](https://epyk.gitbook.io/epyk-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://epyk.gitbook.io/epyk-docs/pyplugins/pymobcoins/shop-configuration.md).

# Shop Configuration

Configure each pyMobCoins shop in its own YAML file under `shops/`.

Default shop files include:

* `shops/main.yml`
* `shops/daily.yml`

Every file begins with a `shop` section. Use `main.yml` for permanent rewards. Use `daily.yml` for rotating offers.

### Choose the default shop

Set `general.main_shop` in `config.yml`. This shop opens when players run `/mobcoins`.

```yaml
general:
  main_shop: main
```

This configuration opens `shops/main.yml`.

### Create a simple shop

A simple shop is a permanent catalogue. Its rewards never rotate automatically.

Start with these required settings:

```yaml
shop:
  enabled: true
  item_amount: 6
  rotation:
    enabled: false
    every_hours: 24
```

* `enabled` makes the shop available.
* `item_amount` sets the number of rewards displayed.
* `rotation.enabled: false` keeps the shop permanent.

Ensure the menu has enough unoccupied slots. Decorations can prevent rewards from appearing.

#### Simple shop example

```yaml
shop:
  enabled: true
  item_amount: 3

  messages:
    refresh: "&apyMobCoins &8> &7Shop offers were reloaded."

  rotation:
    enabled: false
    every_hours: 24

  menu:
    title: "&8MobCoins Shop"
    rows: 5
    decorations:
      wallet:
        material: PLAYER_HEAD
        display_name: "&e&lCoin Wallet"
        lore:
          - "&7Balance: &f{BALANCE}"
        slot: 36

  items:
    diamond-pickaxe:
      material: DIAMOND_PICKAXE
      display_name: "&b&lMiner Pickaxe"
      lore:
        - "&7A useful mining reward."
        - ""
        - "&7Price: &b{PRICE} coins"
        - "&8Click to buy one"
      price: 12
      bulk_buy: false
      commands:
        - "give {PLAYER} DIAMOND_PICKAXE {AMOUNT}"
```

### Configure the menu

Configure the inventory under `shop.menu`.

* `title` sets the inventory title.
* `rows` sets inventory height. Use `3`, `4`, `5`, or `6`.
* `decorations` adds buttons, fillers, balances, and shortcuts.

Each decoration supports these options:

* `material` — Bukkit or Paper material.
* `base64` — optional custom head texture.
* `display_name` and `lore` — displayed item text.
* `slot` or `slots` — menu positions.
* `fill_border` — fills the menu border.
* `target_shop` — opens another shop when clicked.

Use slot ranges where needed:

```yaml
slots: [0-8, 9, 17, 18, 26]
```

#### Add a shop shortcut

Use `target_shop` to link menus together.

```yaml
daily_shortcut:
  target_shop: daily
  material: AMETHYST_SHARD
  display_name: "&d&lDaily Vault"
  lore:
    - "&7Fresh offers in &f{REFRESH_TIME_daily}&7."
    - ""
    - "&dClick to open"
  slot: 40
```

This button opens the `daily` shop.

### Add shop items

Add rewards under `shop.items`. Each item uses a unique custom ID.

```yaml
items:
  miner-kit:
    material: DIAMOND_PICKAXE
    display_name: "&b&lMiner Kit"
    lore:
      - "&8Permanent Reward"
      - ""
      - "&7A clean diamond pickaxe for"
      - "&7fresh mines or backup gear."
      - ""
      - "&7Price: &b{PRICE} coins"
      - "&8Click to buy one"
    price: 12
    bulk_buy: false
    commands:
      - "give {PLAYER} DIAMOND_PICKAXE {AMOUNT}"
```

Item settings include:

* `material` — the GUI item material.
* `price` — base MobCoins price.
* `commands` — console commands after purchase.
* `bulk_buy` — enables quantity selection.
* `stock` — optional purchase limit.
* `sale` — optional discount configuration.

Commands support:

* `{PLAYER}` — purchasing player.
* `{AMOUNT}` — purchased quantity.

Commands run from the console. Include `{AMOUNT}` to support bulk purchases.

#### Use item lore placeholders

Item lore supports live price, balance, sale, and stock values.

* `{PRICE}` — final price after discounts.
* `{OLD_PRICE}` or `{OLD-PRICE}` — original price.
* `{NEW_PRICE}` or `{NEW-PRICE}` — discounted price.
* `{SALE_PERCENT}` or `{SALE-PERCENT}` — active discount.
* `{BALANCE}` — player's MobCoins balance.
* `{STOCK}`, `{MAX_STOCK}`, and `{BOUGHT}` — current stock details.

### Configure stock

Use `stock` to limit purchases during a rotation.

```yaml
stock: 5
```

This item can be purchased five times before its next refresh.

Set `stock: -1` for unlimited purchases.

```yaml
lore:
  - "&7Price: &d{PRICE} coins"
  - "&7Stock: &d{STOCK}&8/&d{MAX_STOCK}"
  - "&8Click to buy one"
```

Stock is most useful for rotating shops.

### Create a rotating shop

A rotating shop selects active rewards on a schedule.

```yaml
rotation:
  enabled: true
  every_hours: 24
```

Add `at_time` to refresh at a fixed server-local time.

```yaml
rotation:
  enabled: true
  every_hours: 24
  at_time: "08:00"
```

`item_amount` controls selected rewards per rotation. If ten rewards exist and `item_amount` is six, only six appear.

#### Rotating shop example

```yaml
shop:
  enabled: true
  item_amount: 3

  messages:
    refresh: "&dpyMobCoins &8> &7A new set of daily finds is now available."

  rotation:
    enabled: true
    every_hours: 24
    at_time: "08:00"

  menu:
    title: "&8Market &7/ &dDaily Finds"
    rows: 5
    decorations:
      reset_clock:
        material: CLOCK
        display_name: "&d&lNext Shipment"
        lore:
          - "&7Stock changes in:"
          - "&f{REFRESH_TIME}"
        slot: 4
      catalogue_shortcut:
        target_shop: main
        material: COMPASS
        display_name: "&b&lCatalogue"
        lore:
          - "&7Return to the permanent shop."
          - ""
          - "&bClick to open"
        slot: 40

  items:
    star-fragment:
      material: NETHER_STAR
      display_name: "&f&lStar Fragment"
      lore:
        - "&8Daily Find"
        - ""
        - "&7Old price: &m{OLD_PRICE}&7 coins"
        - "&dSale: -{SALE_PERCENT}%"
        - "&7Now: &d{NEW_PRICE} coins"
        - "&7Stock: &d{STOCK}&8/&d{MAX_STOCK}"
        - "&8Click to buy one"
      price: 28
      sale:
        enabled: true
        min_percent: 5
        max_percent: 15
      stock: 4
      bulk_buy: false
      commands:
        - "give {PLAYER} NETHER_STAR {AMOUNT}"
```

### Add sales

Configure a random discount for each item.

```yaml
sale:
  enabled: true
  min_percent: 5
  max_percent: 15
```

pyMobCoins selects a percentage within this range when the item enters the shop.

Use identical values for a fixed sale.

```yaml
sale:
  enabled: true
  min_percent: 10
  max_percent: 10
```

Disable sales explicitly when needed:

```yaml
sale:
  enabled: false
  min_percent: 0
  max_percent: 0
```

### Enable bulk buying

Set `bulk_buy: true` for quantity selection.

```yaml
bulk_buy: true
```

Players then use the bulk purchase menu from `config.yml`.

```yaml
interface:
  mass_purchase_menu:
```

Use bulk buying for stackable rewards, such as `DIAMOND`, `EMERALD`, or `FIREWORK_ROCKET`.

Set `bulk_buy: false` to sell one item per purchase.

### Refresh messages and timers

Set a message for each shop refresh:

```yaml
messages:
  refresh: "&apyMobCoins &8> &7Shop offers were reloaded."
```

Decoration lore supports refresh timers:

* `{REFRESH_TIME}` — current rotating shop.
* `{REFRESH_TIME_daily}` — a specific shop.

### Checklist

* Use valid Bukkit or Paper material names.
* Reserve enough menu slots for shop items.
* Avoid overlapping decoration and purchase slots.
* Use `rotation.enabled: false` for permanent shops.
* Use `rotation.enabled: true` for rotating shops.
* Remember that `price` is the pre-sale amount.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://epyk.gitbook.io/epyk-docs/pyplugins/pymobcoins/shop-configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
