Categories and items
Every file in plugins/mcCoinShop/coinshop/ is a category. The file name is the category id, so ranks.yml is the category ranks. An item is referred to as category.item (for example ranks.vip) in commands, sales, coupons and placeholders.
Category settings#
The gui section sets the title, the size and the filler:
gui:
title: "<gradient:#FFD76A:#FF9F43><bold>Ranks</bold></gradient>"
# auto fits the menu to its items and centers them. You can also use 27, 36, 45 or 54.
size: auto
fill-empty-slots: true
fill-item:
material: ORANGE_STAINED_GLASS_PANE
size: auto fits the menu to its items and centers them. You can also use 27, 36, 45 or 54. Items with no slot fill the menu by themselves, and more pages appear when needed. Price, stock and limit lines are added to the lore for you.
A simple item#
Only display and price are required. This stack of cobblestone comes from the example Blocks category:
cobblestone:
display: {material: COBBLESTONE, name: "&7Cobblestone &8x64"}
price: {buy: 20, currency: coins}
item: {material: COBBLESTONE, quantity: 64}
display is the icon in the menu. item is what the player receives. They can differ.
An item with enchantments#
iron_sword:
display:
material: IRON_SWORD
name: "&fIron Sword"
lore:
- "&7Sharpness II"
price:
buy: 250
currency: coins
item:
material: IRON_SWORD
enchants:
sharpness: 2
An item that runs commands#
Items can run console commands instead of (or as well as) giving an item. %player% is the player who receives the item and %buyer% is the player who paid, which differs when the item is a gift.
vip:
display:
material: EMERALD
glow: true
name: "&a&lVIP"
lore:
- "&7Monthly rank."
- ""
- "&8• &7Join when the server is full"
- "&8• &7/fly"
- "&8• &710 homes"
price:
buy: 5000
currency: coins
commands:
- "lp user %player% parent add vip"
An item can also reward several items. Under item:, use an items: list of item sections instead of a single item.
All item options#
Everything below goes under an item in coinshop/<category>.yml. See the Item options reference for the full table.