Skip to content
divios edited this page Jun 6, 2022 · 36 revisions

Item Settings

Material

Represents the material of the item. It has to be a valid material or it will be skipped.

DIRT:
  material: DIRT

You can also add a custom base64 as well:

custom_head:
  material: base64:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2VjYjZkM2JhZjkwYWQ5MDQ2OThjMTVkNGFiOWI3YzA4NTNkOTA5MWUyZjUxY2Y5OGNkODdiYTM4ZWQ1ODIwNSJ9fX0=

Name

This is the name of the item. Supports markdown

DIRT:
  material: DIRT
  name: "&cWow custom Dirt"

Lore

This is the lore of the item. Supports markdown

DIRT:
  material: DIRT
  name: "&cWow custom Dirt"
  lore:
    - "&7This is incredible"
    - "&7dirt indeed"

Item Flags

You can set the Item Flags of an item. It has to be a valid flag, you can check them here

AXE:
  material: GOLD_AXE
  name: "An axe with attributes hidden"
  flags:
    - HIDE_ATTRIBUTES
    - HIDE_UNBREAKABLE

Unbreakable

You can set if an item should be unbreakable.

PICKAXE:
  material: NETHERITE_PICKAXE
  name: "An unbreakable pickaxe"
  unbreakable: true

Enchantments

You can set the enchantments of the item. It can be any enchantment, even if it shouldn't be possible to add it to the item in question.

enchantments:
  material: DIAMOND_AXE
  enchantments:
    - enchant: DIG_SPEED
      level: 1
    - enchant: DAMAGE_UNDEAD
      level: 1

Potions

You can set the type of a potion. The material has to be a potion, this is POTION, SPLASH_POTION or LINGERING_POTION. It also has to be a valid potion type, you can check them here

potion:
  material: POTION
  potion:
    - type: INVISIBILITY
    - upgraded: true
    - level: 2
    - color: ORANGE

The only required parameter is type, the others are optional. The color can be choosen from here, but RGB is also supported, for example - color: 30:20:40

Spawn Eggs

Spawn eggs are supported natively, this means that you can but them as material and the plugin will automatically parse it for you

ZOMBIE_SPAWN_EGG:
  material: ZOMBIE_SPAWN_EGG

Spawners

Spawners are not supported natively (at least for the moment). To make them work, you need Silkspawners or MineableSpawners. After that, you can use them with:

SKELETON_SPAWNER:
  material: SPAWNER
  mob: SKELETON

Prices

Represents the buy/sell price of the item. Currently there are two types:

  • Fixed: the price stays the same
  • Min-Max: the price takes a value between the max and min values every time is chosen as a new daily item.
  • mean-var: the price takes the value of a gaussian with the given mean and variance
wood:
  material: WOOD
  buyPrice:
    fixed: 30.5
wood:
  material: WOOD
  buyPrice:
    min: 50
    max: 120
wood:
  material: WOOD
  buyPrice:
    mean: 80.0
    var: 30.0

If the value is = 0, then the item can't be purchased/sold. If the value == 0, then the item is free (only valid when buying). If, for example, buyPrice is not specified, then it defaults to -1, so players cannot purchase it. Also if both prices are not specified or <= 0, then the item will not be taken into account when restocking a store with new items. This can be useful if you want to make an item limited to a bundle (explained later)

You can also specify on min-max and mean-var if the price generated should be rounded without decimals. You can achieve this with the round option, the available values are: none, floor and ceil

wood:
  material: WOOD
  buyPrice:
    mean: 80.0
    var: 30.0
    round: CEIL

In the future it is planned to add a system to automatically lower or increment the price depending on the offer/demand

Economies (Premium)

Represents the economy to use when withdrawing/adding money to a player. The currenly supported economies are: vault, gemsEconomy, tokenEnchants, tokenManager, MPoints, playerPoints, ultraEconomy. If no economy is specified, the default is Vault.

econ_example:
  material: EMERALD
  buyPrice:
    fixed: 30.5
  econ:
    name: vault

Some economies, like gemsEconomy, have multiple currencies. To select one, add the currency field.

econ_example:
  material: EMERALD
  buyPrice:
    fixed: 30.5
  econ:
    name: gemsEconomy
    currency: gems

Quantity

The initial quantity of the item.

Stock (Premium)

This is one of the most powerful features of the plugin. It allows to have a limit amount of stock of an item in a shop, just like in real life. It comes with two modes, individual and global

Individual

IRON_SWORD:
  material: IRON_SWORD
  buyPrice:
    fixed: 30
  stock:
    type: INDIVIDUAL
    amount: 32

The stock is individual for each player, meaning that if a player purchases the item, the stock will be lowered to 31, but if a different player comes to the shop, he will see 32


Global

Diamond:
  material: DIAMOND
  buyPrice:
    fixed: 30
  stock:
    type: GLOBAL
    amount: 4

The stock is the same for each player, meaning that if a player purchases the item, the stock will be lowered to 3 and a new player will see 3 too.


You can also set the stock to increase with each sale with the incrementOnSell field.

Diamond:
  material: DIAMOND
  buyPrice:
    fixed: 30
  stock:
    type: GLOBAL
    amount: 4
    incrementOnSell: true

With the explanation of the incrementOnSell feature, now is time to explain how the stock works. By default, the amount field determines the start stock and also the max stock available. This can be override with the field max, allowing to set the start stock that the shop has of the item and also the max stock possible separately.

Diamond:
  material: DIAMOND
  buyPrice:
    fixed: 30
  stock:
    type: GLOBAL
    amount: 4
    max: 10
    incrementOnSell: true

Another option available, which only makes sense when the incrementOnSell is active. This is allowSellOnMax, by default is true, meaning that players can sell items even when stock is at is maximum. Setting this to false will invalidate this:

Diamond:
  material: DIAMOND
  buyPrice:
    fixed: 30
  stock:
    type: GLOBAL
    amount: 4
    max: 10
    incrementOnSell: true
    allowSellOnMax: false

Finally, by default, the incrementOnSell feature won't exceed the max amount, this means that, taking the example above, if the current stock is 3 and a player sells a diamond, the stock will increase to 4, but if another diamond is sold, the stock won't go any further. You can override this with the field exceedDefault

Diamond:
  material: DIAMOND
  buyPrice:
    fixed: 30
  stock:
    type: GLOBAL
    amount: 4
    incrementOnSell: true
    exceedDefault: true

Rarity

The rarities allows to modify how likely it is that an item is picked up when a shop is replenish with new items. Currently the rarities available are:

Primer encabezado Segundo encabezado
Common 100%
UnCommon 80%
Rare 60%
Epic 40%
Ancient 20%
Legendary 10%
Mythic 5%
Unavailable 0%

The percentages, in short, work like this: a new item is chosen randomly, for example an epic item, in this case there is a 40% chance that this item will be chosen, if not, a new item is rolled and the same operation is repeated until there is not more space in the shop inventory.

The unavailable rarity is a special one. Items labeled with this rarity will never picked. Could be useful to make an item limited to a bundle.

mythic_Diamond:
  name: "Mythic Diamond"
  material: DIAMOND
  buyPrice:
    fixed: 30
  rarity: Mythic

In the future it is planned to add the ability to add custom rarities.

Commands

When this field is specified, all the commands will be executed instead of giving the item to the player. You can add %player% as placeholder that will be replaced with the buyers name.

gold_chestplate:
  material: GOLD_CHESTPLATE
  sellPrice:
    fixed: 30
  stock:
    type: GLOBAL
    amount: 30
  commands:
    - broadcast %player% have just bought a gold_chestplate
    - broadcast run or all the existences will run out.

The commands are executed as console

Permissions

You can specify permissions a player needs to be able to buy/sell an item.

wood_with_perms:
  material: WOOD
  sellPrice:
    fixed: 30
  buyPerms:
    - custom.perm.node.1
    - custom.perm.node.2
  sellPerms:
    - custom.perm.node.3

Bundle (Premium)

If this field is specified, when the player buys the item, all the items specified will be given to him. The items are specified by its IDs.

bundle:
  material: DIRT
  buylPrice:
    fixed: 30.45
  bundle: 
    - id1
    - id2
    - id3

Confirm Gui

If true, when an item is clicked, a confirm menu will appear allowing the player to choose the quantity whey want to buy/sell. If false, the quantity field will be picked if specified, or 1 by default. Defaults to true.

gold_chestplate:
  material: GOLD_CHESTPLATE
  sellPrice:
    fixed: 30
  confirm_gui: true

NBT (Premium)

You can set custom nbt for a item.

custom_item:
  material: DIAMOND_SWORD
  sellPrice:
    fixed: 15.5
  nbt:
    custom_nbt: true