shop-configuration.yml

The Shop System in CrisStealCore allows you to create fully customizable GUIs for selling hearts, items, or anything else. Each shop is defined in a .yml file located inside the /shop/ folder, and you can have multiple pages or separate shop categories.

📁 Folder Structure

/plugins/CrisStealCore/
 ├── configuration.yml
 ├── items/
 │   ├── heart_1.yml
 │   ├── heart_2.yml
 │   └── ... create more if you want
 ├── shop/
 │   ├── shop_example.yml
 │   ├── shop_page_2.yml
 │   ├── vanilla_farm.yml
 │   └── ... create more if you want
 └── shop-configuration.yml
  • Each .yml file inside /shop/ is a separate shop GUI.

  • You can link shops together using the PAGE action.

  • All shop commands and behavior are defined in shop-configuration.yml.

🧭 Shop Configuration (shop-configuration.yml)

This file controls how players open each shop and what permissions or aliases they have.

shop-commands:
  shop_example: # Shop file name (shop_example.yml)
    command: /heart shop # Command to open the shop
    permission: criscore.heartshop # Permission required
    aliases: [hrt] # Alternative commands

  shop_page_2:
    command: /heart shop 2
    aliases: [heart2] # No permission set = anyone can use

  items-shop:
    command: /shop items
    aliases: [items]

  vanilla_farm:
    command: /shop farm
    aliases: [farm, seeds]
  • Each key (shop, shop_page_2, vanilla_farm) matches the name of the .yml shop file in /shop/.

  • You can create unlimited custom shop commands.

  • permission is optional. If omitted, everyone can access the shop.

🌍 World Restrictions & Sounds

disable-world: [example_world, example_world_2] # Worlds where shops are disabled

not-enough: "ENTITY_VILLAGER_NO" # Sound played when player can't afford an item
purchased: "ENTITY_PLAYER_LEVELUP" # Sound played after a successful purchase

💰 Price Display Format

# Price display format (used only with Vault economy)
# Uses Java DecimalFormat syntax.
price-format: "%,.0f"

Examples

Format
Output Example

%f

1000.000000

%,.0f

1,000

%,.2f

1,000.00

🏪 Example: Shop (shop_example.yml)

# This is the main shop file. You can create multiple pages and link them using the PAGE action.
title: "&8Heart Shop - Page 1"

gui:
  size: 27 # Number of slots in the GUI (must be a multiple of 9)
  background:
    material: "BLACK_STAINED_GLASS_PANE" # Background filler item
    decoration-range: "all" # Fill all slots or only the border

global-lore:
  - ""
  - "&7&r-----------------------------"
  - "&7Price: &6${price}"
  - "&aClick to buy"

items:
  heart1:
    slot: 13
    item-id: heart_1 # Custom item from /items/ folder
    price: 250

  heart2:
    slot: 11
    item-id: heart_2
    price: 450

  heart3:
    slot: 15
    item-id: heart_3
    price: 750

  to_page_2:
    slot: 26
    sound: "UI_BUTTON_CLICK"
    material: ARROW
    name: "&e&lNext Page"
    lore:
      - "&7Go to page 2"
    action: "PAGE,shop_page_2" # Opens shop_page_2.yml when clicked

  close_button:
    slot: 22
    sound: "UI_BUTTON_CLICK"
    material: BARRIER
    name: "&c&lClose Shop"
    lore:
      - "&7Click to close this shop"
    action: "CLOSE" # Closes the GUI

🧾 Notes

  • item-id refers to a custom item file from the /items/ folder (e.g., heart_1.yml).

  • You can also use a regular Minecraft material instead of item-id.

  • price defines how much the player pays (uses Vault or plugin coins depending on config).

  • sound plays when the player clicks the item.

  • action defines what happens when clicked:

    • BUY (default): buys the item.

    • PAGE,<filename>: opens another shop file.

    • CLOSE: closes the menu.

🌾 Example: Vanilla Farm Shop (vanilla_farm.yml)

# Vanilla Farm shop example - sells seeds and plants
title: "&8&lFarm Shop"

gui:
  size: 27
  background:
    material: "BLACK_STAINED_GLASS_PANE"
    decoration-range: "border" # only fill border slots

global-lore:
  - ""
  - "&7&r-----------------------------"
  - "&7Price: &6${price}"
  - "&aClick to buy"

items:
  wheat_seeds:
    slot: 10
    material: WHEAT_SEEDS # Standard Minecraft material
    name: "&e&lWheat Seeds"
    lore:
      - "&7Grow wheat in your farm"
      - "&7Basic crop for bread"
    price: 25
    quantity-buy: 8 # Number of items received per purchase
    stack-size: 8   # Item stack size shown in GUI

🧾 Notes

  • You can mix custom item-id items and vanilla material items.

  • quantity-buy determines how many items are given when purchased.

  • Each shop file can have a unique design, size, and theme.

🔧 Tips

Last updated