Skip to content
goflishMC edited this page Oct 24, 2024 · 1 revision

When ItemShops is loaded for the first time it generates a configuration file and an example shop that is imported into /plugins/BossShopPro/shops.

  • That shop can be opened with the /quickshop command.

Every item is set up like following:

  stone:
    Worth: 3.0
    Item:
    - type:STONE
    - amount:64
  • Instead of one buy-price and one sell-reward every item just has one worth value.
  • buy price = worth * price multiplier (defined in config.yml)
  • sell reward = worth * reward multiplier (defined in config.yml)

Define fix buy-price and sell-reward values

  stone:
    PriceBuy: 5.0
    RewardSell: 1.0
    Item:
    - type:STONE
    - amount:64
  polishedgranite:
    Worth: 3.0
    PriceBuy: 7.0
    Item:
    - type:STONE
    - durability:2
    - amount:64

Besides the worth every item needs some basic information.

  • Only the type/id is completeley necessary ("type:" or "id:")
  • The amount is needed if you are using simple shops else it will be ignored
  • You can add any kind of additional information
  • durability:<durability> - This is used to define the sub-id of the material
  • Many more. Here's a complete list: Link

ItemShops already comes with a big shop with predefined items that you can instantly use. Of course you can create your own shops too or expand the default one.

Configuration file (Here you can modify the look of the shops if you want to)

# BossShopPro
# by Felix Neubauer
# Check out following page for more information: https://www.spigotmc.org/wiki/bossshoppro-addons
#
#
# PriceMultiplier:
# The price players need to pay to buy items = worth * PriceMultiplier.
PriceMultiplier: 1.2
#
#
# RewardMultiplier:
# The rewards players get when selling items = worth * RewardMultiplier.
RewardMultiplier: 0.6
#
#
# WorthIsForOneUnit:
# If enabled the given worth counts for one unit of the item only. If disabled the worth will count for the whole given item.
# Examples:
# Feature enabled: worth of 64 log = 64 * given value
# Feature disabled: worth of 64 log = given value
WorthIsForOneUnit: true
#
#
# CurrencyType:
# This is the kind of currency that is used for all items. Supported are all currencies that work with numbers (Money, Points, Exp).
CurrencyType: money
#
#
# UseAdvancedStyle:
# If enabled each shopitem gets its own sub-shop where players can specify the amount of items they want to buy/sell.
UseAdvancedStyle: true
#
#
# AllowSell:
# If disabled players can only buy but not sell items.
# This is a general setting that can be overridden by items of your choice by simply adding the line "AllowSell: <true/false>" to that item.
AllowSell: true
#
#
# AllowBuy:
# If disabled players can only sell but not buy items.
# This is a general setting that can be overridden by items of your choice by simply adding the line "AllowBuy: <true/false>" to that item.
AllowBuy: true
#
#
# AllowSellAll:
# If enabled players can sell all their items of that type with just one click.
# This is a general setting that can be overridden by items of your choice by simply adding the line "AllowSellAll: <true/false>" to that item.
AllowSellAll: true
#
#
# AllowBuyAll:
# If enabled players can fill their inventory with items of that type with just one click
# This is a general setting that can be overridden by items of your choice by simply adding the line "AllowBuyAll: <true/false>" to that item.
AllowBuyAll: true
#
#
# ShopItemLookSimple:
# Here you can define the look of all shopitems when having the simple mode activated.
ShopItemLookSimple:
  MenuItem:
  - 'lore:&eClick &2left &eto buy &b%reward% &efor &c%price%&e.'
  - 'lore:&eClick &2right &eto sell &c%price_right% &efor &b%reward_right%&e.'
  - 'lore:&eClick your &2mousewheel &eto sell &c%price_middle% &efor &b%reward_middle%&e.'
  MessageBuy: '&eYou''ve bought &3%reward% &efor &c%price%&e'
  MessageSell: '&eYou''ve sold &c%price_right% &efor &3%reward_right%&e.'
  MessageSellAll: '&eYou''ve sold &c%price_middle% &efor &3%reward_middle%&e.'
#
#
# ShopItemLookAdvanced
# Here you can define the look of all shopitems when having the advanced mode activated.
ShopItemLookAdvanced:
  SubShop:
    Displayname: '&8ItemShop &8&l[right] &8%id%'
  Preview:
    MenuItem:
    - amount:%amount%
  Buy:
    MenuItem:
    - type:160:5
    - name:&aBuy
    - amount:1
    - 'lore:&fAmount: &e%amount%'
    - 'lore:&fCost: &e%price%'
    - 'lore:'
    - 'lore:&f&nClick to buy.'
    Message: '&eYou''ve bought &3%reward% &efor &3%price%&e.'
  Sell:
    MenuItem:
    - type:160:6
    - name:&cSell
    - amount:1
    - 'lore:&fAmount: &e%amount%'
    - 'lore:&fReward: &e%reward%'
    - 'lore:'
    - 'lore:&f&nClick to sell.'
    Message: '&eYou''ve sold &3%price% &efor &3%reward%&e.'
  SellAll:
    MenuItem:
    - type:BUCKET
    - 'name:&cSell All'
    - amount:1
    - 'lore:&fReceive &e%reward%.'
    - 'lore:'
    - 'lore:&f&nClick to sell all.'
    Message: '&eYou''ve sold &3%price% &efor &3%reward%&e.'
  Back:
    MenuItem:
    - type:REDSTONE
    - amount:1
    - name:&cBack
    - 'lore:&f&nClick to go back to the shop.'
    Message: ''
  Close:
    MenuItem:
    - type:BARRIER
    - amount:1
    - name:&cClose
    - 'lore:&f&nClick to close the menu.'
    Message: ''

Example ItemShop (Put all your ItemShops in the plugins/BossShopPro/shops folder)

ShopName: ItemShop
DisplayName: '&8ItemShop (%page%/%maxpage%)'
Command: itemshop
signs:
  text: '[ItemShop]'
  NeedPermissionToCreateSign: true
itemshop:
  stone:
    Worth: 3.0
    Item:
    - type:STONE
    - amount:64
  granite:
    Worth: 3.0
    Item:
    - type:STONE
    - durability:1
    - amount:64
  polishedgranite:
    Worth: 3.0
    Item:
    - type:STONE
    - durability:2
    - amount:64
  diorite:
    Worth: 3.0
    Item:
    - type:STONE
    - durability:3
    - amount:64
  polisheddiorite:
    Worth: 3.0
    Item:
    - type:STONE
    - durability:4
    - amount:64
  andesite:
    Worth: 3.0
    Item:
    - type:STONE
    - durability:5
    - amount:64
  polishedandesite:
    Worth: 3.0
    Item:
    - type:STONE
    - durability:6
    - amount:64
  grass:
    Worth: 1.0
    Item:
    - type:GRASS
    - amount:64
  dirt:
    Worth: 1.0
    Item:
    - type:DIRT
    - amount:64
  cdirt:
    Worth: 1.0
    Item:
    - type:DIRT
    - durability:1
    - amount:64
  podzol:
    Worth: 1.0
    Item:
    - type:DIRT
    - durability:2
    - amount:64
  cobblestone:
    Worth: 1.0
    Item:
    - type:COBBLESTONE
    - amount:64
  wood:
    Worth: 0.5
    Item:
    - type:WOOD
    - amount:64
  pineplank:
    Worth: 0.5
    Item:
    - type:WOOD
    - durability:1
    - amount:64
  birchplank:
    Worth: 0.5
    Item:
    - type:WOOD
    - durability:2
    - amount:64
  jungleplank:
    Worth: 0.5
    Item:
    - type:WOOD
    - durability:3
    - amount:64
  acaciaplank:
    Worth: 0.5
    Item:
    - type:WOOD
    - durability:4
    - amount:64
  darkoakplank:
    Worth: 0.5
    Item:
    - type:WOOD
    - durability:5
    - amount:64

Example with BossShopPro shop and ItemShop combined

ShopName: CombinedShop
DisplayName: '&8CombinedShop (%page%/%maxpage%)'
Command: combinedshop
signs:
  text: '[CShop]'
  NeedPermissionToCreateSign: true
itemshop:
  stone:
    Worth: 3.0
    Item:
    - type:STONE
    - amount:64
  granite:
    Worth: 3.0
    Item:
    - type:STONE
    - durability:1
    - amount:64
shop:
  Back:
    MenuItem:
    - lore:&8Back to Menu
    - name:&cBack
    - amount:1
    - type:REDSTONE
    RewardType: SHOP
    Reward: shop
    PriceType: NOTHING
    Price: 10.0
    Message: ''
    ExtraPermission: ''
    InventoryLocation: 9
Clone this wiki locally