Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Configuration

dkim19375 edited this page Sep 21, 2021 · 7 revisions

Configuration

This section explains parts of the config that might not have been easy to explain in the file itself (in the comments)

Most of the config.yml is already explained in the comments, so for questions about the config.yml please join the discord server :)

The information below will be about the shop.yml.

Note: By default, it should have the default items in Hypixel, if you notice something missing or changed, please let me know!

The structure of the shop.yml is like this:

item-name: 
  details: values
another-item-name:
  details: values

For example, for wool:

wool:
  slot: 19
  material: 'WOOL'
  amount: 16
  cost: 4
  cost-item: 'IRON'
  display-name: 'Wool'
  item-category: 'BLOCKS'

The name is wool, with the details being slot, material, etc.

There are a variety of options that you can configure your item with.

Below I explain every configuration option with this information:

  • Key: The configuration key, for example above slot or material would both be keys.
  • Required: true/false, True meaning that you will need this or else the item will not show. False means that it is optional.
  • Description: Information about the option, such as what to put the value as.

IMPORTANT: Examples are not complete - they are just meant to show you how to use the configuration option.

Slot

This is the location of the item. If it is a permanent item (such as a wooden sword), you may put this as -1.

This can be configured in two ways:

Rows/Columns

Keys: row and column

Required: true (both)

row requires a number - the row, and column requires a number - the column.

Example:

item:
  row: 3
  column: 2

In the GUI, it would be positioned like this:

-  -  -  -  -  -  -  -  -
-  -  -  -  -  -  -  -  -
-  X  -  -  -  -  -  -  -
-  -  -  -  -  -  -  -  -
-  -  -  -  -  -  -  -  -
-  -  -  -  -  -  -  -  -

Slot Number

Key: slot

Required: true

You can also use the slot number.

The slot number starts at 0, unlike the Rows/Columns above

It starts from the top left, then goes towards the right side.

Example:

item:
  slot: 19

In the GUI, it would be positioned like this:

-  -  -  -  -  -  -  -  -
-  -  -  -  -  -  -  -  -
-  X  -  -  -  -  -  -  -
-  -  -  -  -  -  -  -  -
-  -  -  -  -  -  -  -  -
-  -  -  -  -  -  -  -  -

Material / Item Type

Key: material

Required: true

The material allows you to change the item type.

For example:

item:
  material: 'WOOL'

would show a Wool block in the GUI.

For a list of all the materials, you may look on one of these website:

Latest version: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html#enum.constant.summary

Other version than latest: https://helpch.at/docs/VERSION/org/bukkit/Material.html#enum_constant_summary

Make sure to replace VERSION with the server version.

For example, https://helpch.at/docs/1.8.8/org/bukkit/Material.html#enum_constant_summary would show the materials for 1.8.8.

Amount

Key: amount

Required: true

The amount changes the amount of items given when bought.

For example:

item:
  amount: 5

would give 5 of the items specified.

Potion Type

Key: potion-type

Required: false (Only required if the item is a potion)

This specifies what the potion effect will be.

For example:

item: 
  potion-type: 'STRENGTH'

will give a strength potion.

For a list of all the potion types, you may look on one of these website:

Latest version: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html#field.summary

Other version than latest: https://helpch.at/docs/VERSION/org/bukkit/potion/PotionEffectType.html#field.summary

Make sure to replace VERSION with the server version.

For example, https://helpch.at/docs/1.8.8/org/bukkit/potion/PotionEffectType.html#field.summary would show the potion effect types for 1.8.8.

Potion Amplifiers

Key: potion-amplifier

Required: false (Only required if the item is a potion)

This specifies the potion amplifier.

For example:

item:
  potion-amplifier: 2

would give a potion with the level 2. (Speed 2 for example)

Potion Duration

Key: potion-duration

Required: false (Only required if the item is a potion)

This specifies how long the potion will last in ticks.

If you do not know what ticks are, then multiply the seconds * 20 to get the ticks.

For example:

item:
  potion-duration: 600

would give a potion that lasts 30 seconds, since 30 seconds * 20 = 600 ticks.

Enchants

Key: enchants

Required: false

This lets you apply different enchantments to the item.

For example:

item:
  enchants:
    - 'DAMAGE_ALL'
    - 'KNOCKBACK:2'

would give an item with Sharpness 1 and Knockback 2.

For a list of all the enchantments, you may look on one of these website:

Latest version: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html#field.summary

Other version than latest: https://helpch.at/docs/VERSION/org/bukkit/enchantments/Enchantment.html#field.summary

Make sure to replace VERSION with the server version.

For example, https://helpch.at/docs/1.8.8/org/bukkit/enchantments/Enchantment.html#field.summary would show the enchants for 1.8.8.

Cost

Key: cost

Required: true

This specifies the cost for the item when bought.

For example:

item:
  cost: 5

would require you to have 5 of an item (ex: iron ingots) to purchase the item.

Cost Item

Key: cost-item

Required: true

This specifies the cost item type.

Available options are IRON, GOLD, and EMERALD.

For example:

item:
  cost-type: 'IRON'
  cost: 5

would require you to have 5 iron ingots to purchase the item.

Name

Key: name

Required: false

This is a user-friendly name for your item. It will not be shown on the item itself.

For example:

item:
  name: 'Custom Item Name'

Display Name

Key: display-name

Required: false

This changes the name of the item from its default name (such as turning "Wooden Sword" into "Weak Sword")

For example:

item:
  display-name: '&cCustom Item Name'

Lore

Key: lore

Required: false

This changes the lore of the item.

For example:

item:
  lore: 
    - 'Line 1 of the lore'
    - '&cSome red lore too'

Permanent

Key: permanent

Required: false

This means that once you die, if you had the item on death, you will keep it on spawn.

Default on Spawn

Key: default-on-spawn

Required: false

This means that once you spawn, you will always receive this item. This is used for items such as the wooden sword.

Item Category

Key: item-category

Required: true

This specifies the shop category the item will be in.

Available categories: BLOCKS, MELEE, ARMOR, TOOLS, RANGED, POTIONS, and UTILITY.

Downgrade

Key: downgrade

Required: false

This lets you choose an item that you will receive if you die with the item.

For example:

wooden-pickaxe:
  material: 'WOOD_PICKAXE'
stone-pickaxe:
  material: 'STONE_PICKAXE'
  downgrade: 'wooden-pickaxe'

means that if you die with a stone pickaxe, you will get the wooden pickaxe.

Commands

Key: commands

Required: false

This lets you run commands when you purchase an item.

For example:

item:
  commands:
    - 'msg %player_name% Thank you for buying this item!'

will run msg player Thank you for buying this item! through console (Remember that you do not use / for console commands!).

Cosmetic Items

Key: cosmetic

Required: false

This lets you add items to the GUI that you cannot purchase.

For example:

item: 
  cosmetic: true # Now players cannot buy this item

Special Items

Key: special-type

Required: false

This lets you set an item as a special item.

Special items: BED_BUGS, DREAM_DEFENDER, MAGIC_MILK, and BRIDGE_EGGS

For example:

item:
  special-type: 'BED_BUGS'

Mob types

Key: mob-type

Required: false

This lets you change the mob type of the mob egg. The material must be MONSTER_EGG though.

For example:

item:
  mob-type: 'IRON_GOLEM'

would give an Iron Golem egg

For a list of all the mob types, you may look on one of these website:

Latest version: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html#enum.constant.summary

Other version than latest: https://helpch.at/docs/VERSION/org/bukkit/entity/EntityType.html#enum.constant.summary

Make sure to replace VERSION with the server version.

For example, https://helpch.at/docs/1.8.8/org/bukkit/entity/EntityType.html#enum.constant.summary show the mob types for 1.8.8.

Weights

Key: weight, weight-category

Required: false

This lets you customize actions when getting items if you already have a certain item.

This could be useful in some cases, such as pickaxe/axes.

For example:

item:
  weight: 1 # Defaults to 0
  weight-category: 'category'

Weight messages

Key: weight-message

Required: false

This lets you customize the message sent when trying to get an item prevented by weights

For example:

item:
  weight-message: '&cYou cannot get this item since you already have another item!'

Weight auto-remove

Key: weight-autoremove

Required: false

Automatically removes lower weighted items when buying a higher weighted item.

Useful for cases like tools.

For example:

item:
  weight-autoremove: true

Weight prevention

Key: weight-prevent

Required: false

Prevents you from getting lower weighted items if you have a higher weighted item

Useful for cases like tools.

For example:

item:
  weight-prevent: true # default to false