Skip to content

Shop

Screaming BedWars plugin uses our own lib called SimpleInventories to create and render inventory-based guis, and therefore shops. This article will show you some basics of this format. Check this wiki for more advanced variables.

Creating a new item

To create a new item, first you need to know internal item's name. You can use Minecraft Wiki to get the specific resource name. The name usually starts with minecraft:, this part can be omitted from the final name.

You can also use modern names in legacy environments (1.8.8-1.12.2). If the modern name does not work, check this page for old names. Old names are deprecated and they may not be supported in future releases of BedWars.

There are two supported formats of items. We call them short stack and long stack.

Using short stack

This format can describe only material name, amount, display name and lore. Except for material name, every part is optional. Each part is divided using semicolon.

1
2
3
4
5
items:
- stone
- dirt;2
- diamond_pickaxe;;Super Sword
- tnt;3;Trinitrotoluene;Does explode

To specify price and make the item buyable, suffix this format with for <amount> <resource>:

1
2
3
4
5
items:
- stone for 1 bronze
- dirt;2 for 3 iron
- diamond_pickaxe;;Super Sword for 5 gold
- tnt;3;Trinitrotoluene;Does explode for 9 iron

In order to be able to specify other attributes (for example properties), we have to convert this from string to map. This is done by splitting the string into variables stack and price:

1
2
3
4
5
6
7
8
9
items:
- stack: stone
  price: 1 bronze
- stack: dirt;2
  price: 3 iron
- stack: diamond_pickaxe;;Super Pickaxe
  price: 5 gold
- stack: tnt;3;Trinitrotoluene;Does explode
  price: 9 iron

Using long stack

Long stack allows you to create items with enchantments and other attributes. Let's see the previous example rewritten in this format:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
items:
- stack: 
    type: stone
  price: 1 bronze
- stack: 
    type: dirt
    amount: 2
  price: 3 iron
- stack: 
    type: diamond_pickaxe
    display-name: Super Pickaxe
  price: 5 gold
- stack: 
    type: tnt
    amount: 3
    display-name: Trinitrotoluene
    lore:
    - Does explode
  price: 9 iron

As we can see, the stack attribute is now a map, which allows more attributes to be present. For example, we can enchant our Super Pickaxe with Fortune III.

1
2
3
4
5
6
- stack: 
    type: diamond_pickaxe
    display-name: Super Pickaxe
    enchants:
      fortune: 3
  price: 5 gold

The enchantment names can be found here.

For list of all available options visit this page.

Using item as a category

You can use any item as a category (even if the item is in another category). Players can then click on that item to open the category. The format is very similar, the only thing you have to specify is a list called items, where you put items of that specific category. Format of items in items is same as format in the base data list.

1
2
3
4
5
6
7
8
- stack: 
    type: diamond_pickaxe
    display-name: Super Pickaxes
    lore:
     - You will never mine with anything else!
  items:
    - wooden_pickaxe for 10 gold
    - golden_pickaxe for 20 gold