Items and the catalog
The catalog is every item the shop is allowed to sell. Each rotation picks from it. There are two ways to manage it.
In game (recommended)#
/shardshop adminopens the admin menu. Open Items, click any item in your own inventory to add it, then click it in the list to edit it./shardshop admin additem <price> [rarity]adds the item in your main hand. The rarity defaults to the last one listed inconfig.yml(Common by default). Prices accept5k,2.5k,1mand1b.
Items added in game keep everything, including data from other plugins. The item editor lets you change the name, description, price, rarity, chance, stock, player limit, lifetime limit, commands and permission, among others.
By hand in items.yml#
The top of items.yml explains every option. This is the template from the file:
my_item:
material: DIAMOND_SWORD
amount: 1
enchants: {sharpness: 5}
custom-model-data: 0
display-name: "&bName"
description: "&7One line of text"
price: 1000
rarity: rare # from config.yml
weight: 10 # higher shows up more often inside its rarity
stock: 5 # shared by all players each rotation. -1 for unlimited
limit: 1 # per player each rotation. -1 for none
lifetime-limit: 1 # per player, ever. -1 for none
give-item: true # false for items that only run commands
commands: # run by the console. %player% %uuid% %quantity%
- "say %player% bought something"
always: false # stays on sale in every rotation
enabled: true
deals: true # false keeps it out of random discounts
permission: "" # needed to buy it
season: {from: "12-01", to: "12-31"} # only sold between these dates (month-day)
Run /shardshop admin reload after editing the file.
Selling ranks, keys and commands#
Set give-item: false and list console commands. The item is then only a button that runs commands. The starter item xp_bundle does this:
xp_bundle:
material: EXPERIENCE_BOTTLE
display-name: "&b&lXP Bundle"
description: "&7Runs a command instead of giving this bottle."
price: 900
rarity: rare
give-item: false
limit: 3
commands:
- "xp add %player% 5 levels"
Commands run once for each unit bought, as the console. %quantity% is the total quantity of that purchase.
Always-on and seasonal items#
always: truekeeps an item on sale in every rotation.season: {from: "12-01", to: "12-31"}limits an item to a date range (month-day).enabled: falsehides it without deleting it.deals: falsekeeps it out of random discounts.
Stock and limits#
stockis shared by every player and resets each rotation.-1is unlimited.limitis per player each rotation.lifetime-limitis per player forever.