The configuration file is located at /MBedwars/shop.yml
.
The configuration file was build with the thought of granting you the ability to customize anything easily. With this, you simply add all the pages and their corresponding items and the plugin will automatically construct a beautiful UI from that. The way or layout of how the items and pages get organized and placed in the UI are called Shop Layouts (former known as Shop Designs). By default, the plugin has 8 included, however more can be easily added through API.
Generally, the shop follows a tree structure that e.g. looks like that:
When looking at the config.yml file itself, it starts at the root with the pages
config:
The pages
config holds multiple entries of a page
:
Each page
also holds multiple entries of item
that will be shown when you enter the page in the shop:
And finally, each item
may hold multiple entries of a product
and multiple entries of a price
:
Each component in the tree structure may also hold certain attributes:
icon: <item material>
force-slot: <slot>
restriction: <arena picker>
[teams=2]
, the item will only display in arenas with two enabled teamsicon: <item material>
id: <string>
caps-multiply: <number>
force-slot: <slot>
description: <description>
keep-on-death: <true / false>
one-time-purchase: <true / false>
permission-id: <id>
mbedwars.shopitem.<id>
restriction: <arena picker>
[teams=2]
, the item will only display in arenas with two enabled teamsbuy-group: <..>
A buy-group is a system which makes it possible to buy items in a tier. In that tier system, every team starts at the lowest available level in the buy-group.
Example of the usage:
Imagine if you have got various unique swords, each with a different level of strength. If a player now decides to purchase the second-strongest sword, he usually still is able to purchase the ones below it afterwards.
The buy-group system prevents that, and enforces the player to purchase stronger swords.
How it is supposed to look like in shop.yml:
items:
- name: "Iron Sword"
buy-group:
name: "Swords" # The name of the group. All items in the same tier system, e.g. swords, must be in the same one
level: 2 # The level of the item, or basically the strength. Wood sword could be e.g. 1, diamond sword could be 3, etc.
Full example: https://pastebin.com/JubNNHE0
Stacking feature:
Optionally, it is also possible to stack them on top of each other.
What stacking means is, that instead of showing all items of the buy-group, only the one that the player can purchase next will be shown.
Thus, this enforces the player to purchase them one by one, instead of possibly skipping some.
For that, simply add the buy-group into the stacked-buygroups
config that is found at the top of the shop.yml file:
# Specify here which buygroups should display in single slot Buygroups here will only display one
# item at a time. You will need to purchase an item for the next one in line to be visiable
stacked-buygroups: [ "Swords" ]
Notes:
Items at level 0 won't be visible in the shop. You may want to use this feature in instead of the giveitems-on-*
configs found in config.yml
It's recommended to use it together with the keep-on-death
config:
keep-on-death
enabled: Player will keep the items after he dies and won't be able to repurchase the current or a lower tierkeep-on-death
disabled: Similar to the other one but player is getting moved to the first tier when he diesBecause it's not possible to repurchase the current tier, it doesn't make sense to use together with one-time-purchase
Make sure that you are incrementing each step by 1, otherwise it won't be purchasable
There are four types of products you can setup in your shop: item, special-item, spawner-item and command. Generally, they all share these configurations:
amount: <number>
auto-wear: <true / false>
unbreakable: <true / false>
display-name: <name>
With the item product type, the player basically receives a simple item on purchase. You would generally put most itemsy, such as weapons, blocks etc., into this category.
material: <item material>
With the special-item product type, the player will receive a special item on purchase. Read here more about what a special item is. Basically, these are the special ones provided by MBedwars (or other addons), such as traps, bridge, TNT sheep, etc.
special-id: <special item id>
(required)With the spawner-item product type, the player will receive a spawner item (e.g. emeralds, irons etc.). Commonly used to trade from one currency to other within a match.
spawner-id: <spawner id>
With the command product type, a certain command will be executed with the purchase. This e.g. allows you to hook into other plugins, such as ones that give the player further unique items.
command: <command>
amount
config you may define how often it shall be executed. By default it's 1Example:
command: "eco give {name} 10"
as-console: true # By default false
as-console: <true / false>
There are two types of prices you can setup in your shop: item and spawner-item. Generally, they all share these configurations:
amount: <number>
amount-perm: <number>
amount
config will be usedWith the item product type, normal items will be taken from the players' inventory.
material: <item material>
With the spawner-item price type, spawner items (e.g. emeralds, irons etc.) will be taken from the players inventory.
spawner-id: <spawner id>
Also available at: https://pastebin.com/WDNhPJmG
Click to open:
# Wiki Page: https://s.marcely.de/mbww7
##### IMPORTANT #### #
# Names surrounded with % will be taken from the messages file.
# Make sure when creating something new to remove the %!
#################### #
# Change the layout of the shop here
# The purpose of a layout is to order and display all the pages & items
# You are able to choose between:
# - Normal
# - Hypixel
# - HiveMC
# - GommeHD
# - Rewinside
# - Minesucht
# - BergwerkLabs
# - HypixelV2
layout-name: Normal
# You may also display players playing Minecraft's Bedrock Edition a different layout
# Use "equally" to display the same layout as with the "layout-name" config
layout-name-bedrock: equally
# Specify here which buygroups should display in single slot Buygroups here will only display one
# item at a time. You will need to purchase an item for the next one in line to be visiable
stacked-buygroups: []
# Configure the pages, items, products and prices here
pages:
'%Shop_Page_Block%':
icon: sandstone
items:
- name: '%Shop_Item_HardenedClay%'
icon: stained_clay
caps-multiply: 32
products:
- type: item
material: stained_clay
amount: 8
prices:
- type: spawner-item
spawner-id: iron
amount: 4
- name: '%Shop_Item_Endstone%'
icon: ender_stone
caps-multiply: 6
products:
- type: item
material: ender_stone
amount: 4
prices:
- type: spawner-item
spawner-id: iron
amount: 8
- name: '%Shop_Item_Chest%'
icon: chest
caps-multiply: 2
products:
- type: item
material: chest
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 1
- name: '%Shop_Item_Enderchest%'
icon: ender_chest
products:
- type: item
material: ender_chest
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 1
- name: '%Shop_Item_Ladder%'
icon: ladder
caps-multiply: 3
products:
- type: item
material: ladder
amount: 6
prices:
- type: spawner-item
spawner-id: iron
amount: 1
- name: '%Shop_Item_Web%'
icon: web
caps-multiply: 3
products:
- type: item
material: web
amount: 3
prices:
- type: spawner-item
spawner-id: iron
amount: 10
'%Shop_Page_Food%':
icon: apple
items:
- name: '%Shop_Item_Apple%'
icon: apple
caps-multiply: 8
products:
- type: item
material: apple
amount: 1
prices:
- type: spawner-item
spawner-id: iron
amount: 1
- name: '%Shop_Item_GrilledPork%'
icon: grilled_pork
caps-multiply: 8
products:
- type: item
material: grilled_pork
amount: 1
prices:
- type: spawner-item
spawner-id: iron
amount: 4
- name: '%Shop_Item_Cake%'
icon: cake
products:
- type: item
material: cake
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 3
- name: '%Shop_Item_GoldenApple%'
icon: golden_apple
products:
- type: item
material: golden_apple
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 1
'%Shop_Page_Armor%':
icon: iron_chestplate
items:
- name: '%Shop_Item_LeatherHelmet%'
icon: leather_helmet {ench:[{lvl:1s,id:0s}]}
products:
- type: item
material: leather_helmet {ench:[{lvl:1s,id:0s}]}
amount: 1
prices:
- type: spawner-item
spawner-id: iron
amount: 5
- name: '%Shop_Item_LeatherLeggings%'
icon: leather_leggings {ench:[{lvl:1s,id:0s}]}
products:
- type: item
material: leather_leggings {ench:[{lvl:1s,id:0s}]}
amount: 1
prices:
- type: spawner-item
spawner-id: iron
amount: 5
- name: '%Shop_Item_LeatherBoots%'
icon: leather_boots {ench:[{lvl:1s,id:0s}]}
products:
- type: item
material: leather_boots {ench:[{lvl:1s,id:0s}]}
amount: 1
prices:
- type: spawner-item
spawner-id: iron
amount: 5
- name: '%Shop_Item_ChainmailChestplateLVL1%'
icon: chainmail_chestplate
products:
- type: item
material: chainmail_chestplate
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 1
- name: '%Shop_Item_ChainmailChestplateLVL2%'
icon: chainmail_chestplate {ench:[{lvl:1s,id:0s}]}
products:
- type: item
material: chainmail_chestplate {ench:[{lvl:1s,id:0s}]}
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 3
- name: '%Shop_Item_ChainmailChestplateLVL3%'
icon: chainmail_chestplate {ench:[{lvl:1s,id:0s},{lvl:1s,id:4s}]}
products:
- type: item
material: chainmail_chestplate {ench:[{lvl:1s,id:0s},{lvl:1s,id:4s}]}
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 7
- name: '%Shop_Item_MagnetShoes%'
icon: chainmail_boots {marcelys-bedwars:{custom-type:"special-item",id:"MagnetShoes"}}
products:
- type: special-item
special-id: MagnetShoes
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 5
'%Shop_Page_Sword%':
icon: wood_sword
items:
- name: '%Shop_Item_KnockbackStick%'
icon: stick {ench:[{lvl:1s,id:19s}]}
products:
- type: item
material: stick {ench:[{lvl:1s,id:19s}]}
amount: 1
prices:
- type: spawner-item
spawner-id: iron
amount: 30
- name: '%Shop_Item_SwordLVL1%'
icon: wood_sword
products:
- type: item
material: wood_sword
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 2
- name: '%Shop_Item_SwordLVL2%'
icon: stone_sword
products:
- type: item
material: stone_sword
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 5
- name: '%Shop_Item_SwordLVL3%'
icon: iron_sword
products:
- type: item
material: iron_sword
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 2
'%Shop_Page_Bow%':
icon: bow
items:
- name: '%Shop_Item_BowLVL1%'
icon: bow
products:
- type: item
material: bow
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 15
- name: '%Shop_Item_BowLVL2%'
icon: bow {ench:[{lvl:1s,id:48s}]}
products:
- type: item
material: bow {ench:[{lvl:1s,id:48s}]}
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 3
- name: '%Shop_Item_BowLVL3%'
icon: bow {ench:[{lvl:1s,id:48s},{lvl:1s,id:49s}]}
products:
- type: item
material: bow {ench:[{lvl:1s,id:48s},{lvl:1s,id:49s}]}
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 6
- name: '%Shop_Item_Arrow%'
icon: arrow
caps-multiply: 3
products:
- type: item
material: arrow
amount: 5
prices:
- type: spawner-item
spawner-id: gold
amount: 1
'%Shop_Page_Pickaxe%':
icon: stone_pickaxe
items:
- name: '%Shop_Item_PickaxeLVL1%'
icon: wood_pickaxe {ench:[{lvl:1s,id:32s}]}
products:
- type: item
material: wood_pickaxe {ench:[{lvl:1s,id:32s}]}
amount: 1
prices:
- type: spawner-item
spawner-id: iron
amount: 7
- name: '%Shop_Item_PickaxeLVL2%'
icon: stone_pickaxe {ench:[{lvl:1s,id:32s}]}
products:
- type: item
material: stone_pickaxe {ench:[{lvl:1s,id:32s}]}
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 4
- name: '%Shop_Item_PickaxeLVL3%'
icon: gold_pickaxe {ench:[{lvl:1s,id:32s}]}
products:
- type: item
material: gold_pickaxe {ench:[{lvl:1s,id:32s}]}
unbreakable: true
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 2
'%Shop_Page_Potion%':
icon: potion
items:
- name: '%Shop_Item_PotionSwiftness%'
icon: potion:speed:3600:0
products:
- type: item
material: potion:speed:3600:0
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 4
- name: '%Shop_Item_PotionRegeneration%'
icon: potion:regeneration:900:0
products:
- type: item
material: potion:regeneration:900:0
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 4
- name: '%Shop_Item_PotionHealing%'
icon: potion:heal:1:0
products:
- type: item
material: potion:heal:1:0
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 5
- name: '%Shop_Item_PotionStrength%'
icon: potion:increase_damage:3600:0
products:
- type: item
material: potion:increase_damage:3600:0
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 4
'%Shop_Page_Special%':
icon: tnt
items:
- name: '%Shop_Item_Teleporter%'
icon: sulphur {marcelys-bedwars:{custom-type:"special-item",id:"Teleporter"}}
products:
- type: special-item
special-id: Teleporter
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 2
- name: '%Shop_Item_Minishop%'
icon: monster_egg:villager {marcelys-bedwars:{custom-type:"special-item",id:"MiniShop"}}
products:
- type: special-item
special-id: MiniShop
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 2
- name: '%Shop_Item_Rescueplatform%'
icon: slime_block {marcelys-bedwars:{custom-type:"special-item",id:"RescuePlatform"}}
products:
- type: special-item
special-id: RescuePlatform
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 3
- name: '%Shop_Item_Tntsheep%'
icon: monster_egg:sheep {marcelys-bedwars:{custom-type:"special-item",id:"TNTSheep"}}
products:
- type: special-item
special-id: TNTSheep
amount: 1
prices:
- type: spawner-item
spawner-id: iron
amount: 24
- name: '%Shop_Item_Trap%'
icon: stone_plate {marcelys-bedwars:{custom-type:"special-item",id:"Trap"}}
products:
- type: special-item
special-id: Trap
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 1
- name: '%Shop_Item_Bridge%'
icon: ink_sack:4 {marcelys-bedwars:{custom-type:"special-item",id:"Bridge"}}
caps-multiply: 2
products:
- type: special-item
special-id: Bridge
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 1
- name: '%Shop_Item_GuardDog%'
icon: monster_egg:wolf {marcelys-bedwars:{custom-type:"special-item",id:"GuardDog"}}
products:
- type: special-item
special-id: GuardDog
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 1
- name: '%Shop_Item_Tracker%'
icon: compass {marcelys-bedwars:{custom-type:"special-item",id:"Tracker"}}
products:
- type: special-item
special-id: Tracker
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 2
- name: '%Shop_Item_Fireball%'
icon: fireball {marcelys-bedwars:{custom-type:"special-item",id:"Fireball"}}
products:
- type: special-item
special-id: Fireball
amount: 1
prices:
- type: spawner-item
spawner-id: iron
amount: 32
- name: '%Shop_Item_MagicMilk%'
icon: milk_bucket {marcelys-bedwars:{custom-type:"special-item",id:"MagicMilk"}}
products:
- type: special-item
special-id: MagicMilk
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 4
'%Shop_Page_Extra%':
icon: fishing_rod
items:
- name: '%Shop_Item_TNT%'
icon: tnt
products:
- type: item
material: tnt
amount: 1
prices:
- type: spawner-item
spawner-id: gold
amount: 2
- name: '%Shop_Item_Enderpearl%'
icon: ender_pearl
products:
- type: item
material: ender_pearl
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 4
- name: '%Shop_Item_Snowball%'
icon: snow_ball
products:
- type: item
material: snow_ball
amount: 1
prices:
- type: spawner-item
spawner-id: iron
amount: 8
- name: '%Shop_Item_FishingRod%'
icon: fishing_rod
products:
- type: item
material: fishing_rod
amount: 1
prices:
- type: spawner-item
spawner-id: emerald
amount: 2