Sueta

Inventory Shop

1.5.3

Buy and sell items via inventory

·Plugin



A simple GUI plugin which allow buy and sell items.

To get information how to create a shop see config.yml
Required Vault and economy plugin

Display name and lore

Items can contain display name, lore and enchantments.
If you want to add it, you need to create a custom item in items.yml (see example) and in shop write $itemname instead of item ID.



Pages

Shop can have several pages. To add a new page, put in the items section empty line.

Example
items:
  - 18 7.5 1.5
  - 18:1 7.5 1.5
  - 18:2 7.5 1.5
  - 18:3 7.5 1.5
  - 30 30.0 6.0
  - 37 9.0 1.8
  - 38 9.0 1.8
  - 38:1 9.0 1.8
  - 38:2 9.0 1.8
  - 38:3 9.0 1.8
  - '' # -------------  new page
  - 38:4 9.0 1.8
  - 38:5 9.0 1.8
  - 38:6 9.0 1.8
  - 38:7 9.0 1.8
  - 38:8 9.0 1.8
  - 175 9.0 1.8
  - 175:1 9.0 1.8
  - 175:4 9.0 1.8
  - 175:5 9.0 1.8
  - 39 15.0 3.0



Commands

  • /shop open <shop> [player] - open GUI
  • /shop list - List of shops
  • /shop reload - Reload plugin

Permissions

  • shop.command.usage - Permission to see usage
  • shop.command.open - Open a GUI
  • shop.command.open.others - Open a GUI for specified player
  • shop.command.list - use /shop list
  • shop.command.reload - use /shop reload

Configuration

config.yml
# In what quantities can you buy and sell items.
amountPattern: '1-16'
# Allow to sell items which have colored display name
ignoreColoredDisplay: true

# Lore will be added to each item
iconsLore:
- '&cLeft Click &6- buy, &cRight Click&6 - sell'
- '&eBuy price: &a{buy_price}'
- '&eSell price: &c{sell_price}'

pageSuffix: ' #{page}'



# These items will be added in the last row
changeAmount:
  enable: true
  slot: 8
  id: iron_ingot
  name: '&eChange amount'
  lore: []
nextPage:
  slot: 6
  id: '351:10'
  inactiveId: '351:8'
  name: '&aNext page'
  inactiveName: '&8Next page'
previousPage:
  slot: 5
  id: '351:13'
  inactiveId: '351:8'
  name: '&cPrevious page'
  inactiveName: '&8Previous page'

customNodes:
  '1':
    slot: 0
    id: arrow
    name: '&eBack'
    lore: []
    action:
    - 'menu'
    close: false


messages:
  noItem: '&cYou must have {amount} of {item}'
  noMoney: '&cYou must have {money} to buy this'
  bought: '&cYou have bought {item} ({amount}) for {money}'
  sold: '&cYou have sold {item} ({amount}) for {money}'

# Sound names can be found here hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
sounds:
  bought: none
  sold: none
  noMoney: none
  noItem: none
shops.yml
blocks:
  name: '&1Blocks'
  command: 'blocks'
  rows: 6
  items:
  # id buy_price sell_price
  - 4 7.5 1
  # id:data buy_price sell_price
  - 98:1 12.0 2.4
  - '$murdolator 300 150'
items.yml
murdolator:
  id: diamond_sword:0
  name: '&c&lMurdolator'
  lore: []
  enchantments:
    DAMAGE_ALL: 6
    FIRE_ASPECT: 1

Similar projects

Plugin →