πŸ›’Shop System

The core feature of InfiniteShops - create beautiful, customizable GUI shops!


Overview

The shop system allows you to create categorized GUI menus where players can buy and sell items. Each shop is defined in a YAML file and can be fully customized.


Creating a Shop

Basic Shop Structure

Create a new file in plugins/InfiniteShops/shops/:

# shops/blocks.yml

# Shop category settings
name: '&2&lBlocks Shop'
size: 54  # Inventory size in slots (9, 18, 27, 36, 45, or 54)
category_display_item: GRASS_BLOCK  # Icon shown in main menu
lore:
  - ''
  - '&a➼ &fOpen the Blocks shop'
  - ''

# Shop items
items:
  dirt1:
    itemType: ITEM
    display_item:
      type: DIRT
      amount: 1
    slot: 10
    show: true
    item:
      type: DIRT
      amount: 1
    shop:
      ecoType: VAULT
      buyPrice: 10.0
      sellPrice: 5.0

Item Configuration

Basic Sellable Item

Item with Custom Display Name and Lore

Item Types

itemType
Description

ITEM

Standard buyable/sellable item

BUTTON

Navigation button (opens menus, runs commands)

FILLER

Decorative item (glass panes, etc.)

COMMAND

Executes commands on purchase

ENCHANT

Enchantment book item


Economy Types

InfiniteShops supports multiple economy types per item:

EcoType
Description
Example

VAULT

Standard Vault economy

$500

EXP

Experience points/levels

100 XP

ITEM

Trade for items

10 Diamonds

CUSTOM

Custom currency

500 Gems

PLAYERPOINTS

PlayerPoints plugin

100 Points

TOKENENCHANT

TokenEnchant tokens

50 Tokens

OR

Either currency option

$500 OR 10 Diamonds

AND

Both currencies required

$500 AND 10 Diamonds

Using EXP as Currency

Using Items as Currency


Opening Other Shop Categories

Button Actions

Action
Description

OPEN_MENU

Open another shop category

PLAYER_COMMAND

Run command as player

CONSOLE_COMMAND

Run command as console

CLOSE

Close the menu

SEARCH

Open search interface


Filler Items (Decorations)


Click Actions

Configure what happens when players click items in config.yml:

Available GUI Actions

Action
Description

BUY

Buy the item

SELL

Sell the item

SELL_ALL

Sell all matching items from inventory

OPEN_MULTIPLE_BUY

Open quantity selection for buying

OPEN_MULTIPLE_SELL

Open quantity selection for selling

BUY_STACKS

Open stack buying menu

SELL_STACKS

Open stack selling menu

EXIT

Close the menu

BACK

Go back to previous menu


Multi-Page Shops

For shops with many items, use navigation buttons to link pages:


Preview System

Allow players to preview items before purchasing. Configure in config.yml:


Search Function

Players can search for items across all shops:


Complete Shop Example


Tips & Best Practices

  1. Use unique item names - Add numbers or suffixes to item keys (e.g., dirt1, stone1)

  2. Always include itemType - Required for all items

  3. Use show: true - Items won't display without this

  4. Match display_item and item - Keep them consistent for clarity

  5. Use camelCase for prices - buyPrice and sellPrice, not buy_price

  6. Wrap prices in shop: section - Required structure for economy settings

  7. Test after changes - Use /ishop reload to apply changes


Last updated