Skip to content

Creating item

broken1arrow edited this page Jul 15, 2022 · 32 revisions

Creating item

This setup if you use 1 file for all menus (same work also if you set up 1 menu for every file).

Menus:
  # menu name, need to be unique. 
  Main_Menu:
    # menu key for all items in the menu (don´t change this name).
    Menu_Items:
      # one menu item, need to be unique name on every button.
      Menu_Icon:
        Slot: 11
        Icon: SUNFLOWER

Or use this setup if you only have 1 menu (for example if you have 1 menu for every file).

Menus:
 # menu key for all items in the menu (don´t change this name).
 Menu_Items:
   # one menu item, need to be unique name on every button.
   Menu_Icon:
   Slot: 11
   Icon: SUNFLOWER

You also have this option.

Menus:
# menu key for all items in the menu (don´t change this name).
Menu_Items:
  # one menu item, need to be unique name on every button.
  Menu_Icon:
  Slot: 11
  Icon: SUNFLOWER

Set material on item.

Type Description
uuid= players universally unique identifier insisted of player name.
base64= is string like this eyJ0ZXh0dXJlcyI6eyJT
url= look like something like this https://textures.minecraft.net/texture/99152905c6e29eaa93965b5d065b1e0ef5275a8c69c706fed6e1e54ea29e9df
Player_Skull= use the player name to get the head of player, use this placeholder %player_name% for example

List of materials.

# The material type you can use placeholders like %player_item_in_hand% or use heads (look on example above).
# As an example of how you can get players head as icon: 
# Icon: Player_Skull=%player_name%
# For base64 head:
# Icon: base64=eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvM2UwYTk1NzZmN2E1MTYxODBiZmI3MWY3YTUzZTc5ODkzMmIxNjM1NDhmODU5YmYzZjJkNmRiODQ3MjdkNzlkYiJ9fX0=
Icon: STONE
# You have this options too and don´t need add a Icon at all.  
# If you want item from players main_hand or off-hand shall be displayed on this slot 
# instead of the normal icon.
Item_from_hand: main_hand
# If you want a armorpiece shall show in this slot.
# You can use armor_helmet,armor_chestplate,armor_leggings,armor_boots.
Item_from_armor_slot: armor_helmet 

Amount

Set amount of items in the menu.

amount: 1 

Dynamic amount

Set amount of items in the menu from a placeholder or a number.

Dynamic_amount: %placeholder%

Slot

Set slots you want this item. You can use this formats:

Slot Description
5 Item will be added in slot 5
5-10 Item will be added between slot 5 and 10
5-10,25 Item will be added between slot 5 and 10, also in slot 25
5,8,9 Item will be added in slot 5,8 and 9 (no other slots)
0-9,38-45 Item will be added between slot 0 to 9 and 38 to 45
Slot: 5

Data

Set durability (depending on minecraft version) on the item placeholder like %player_item_in_hand_data% works or a number. Not recommended use on minecraft 1.13 or newer. On for example 1.12 can you set colors like lime (some has number 5) but should instead ether lime_stained_glass as icon and it will do this conversion auto or use Material_color to set the color on the item.

Data: 1

Modeldata

Set modeldata on the item (is not same as Data), support only numbers (to use this you need minecraft 1.14+ or newer).

Modeldata: 5

Material_color

If you use old minecraft version (1.12 for example) use this option to set color on a item (if you use stained_glass as icon).

Material_color: lime

Rpg

Set rpg colors on some items, like leather armor, potions, splash potions, tipped arrows and firework star (last one if you don´t set FireWork_effect). Support from 0-255.

# Example like this
# Rpg: "38,10,21"
Rpg: #,#,#

Glow

Set it the item shall glow (will hide enchantments). true and the item will glow, keep in main not all items support this.

Glow: true

Enchantments

Set enchantments on the item.

Enchantments:
  # the enchantment name (can be small or big letters).
  silk_touch:
  # level on the item
  level: 1
  # If it shall bypass level restriction (like for example silk touch only have level 1,
  # but you can override that to any level you want).
  level_restriction: false

Priority

Set priority on the button from 0 to 200000. Lower number have higher priority, default is it set to 1 (if you don´t set this value).

Priority: 1

Portion

Set portion on the item. See here for potion effects

Icon: potion
# Set color on the bottle.
Rpg: 38,192,21
# add some effects for the bottle
Potion_effects:
  # the effect name
  FAST_DIGGING:
    # time before the effect get removed.
    duration: 5
    # the strange of the potion (depending on the effect).
    amplifier: 5
# Hide the effect in the lore.
Hide_item_flags:
  - HIDE_POTION_EFFECTS

FireWork

Set portion on the item.

Icon: firework_star 
# Set color if you only want simple item.
Rpg: 38,192,21
# if you want to set more advance fire work effect.
FireWork_effect:
  #List of colors you want to set on item, use this format #,#,#. Is in this order red;green,blue.
  Colors:
    - "38,10,21"
    - "150,58,0"
  #List of fade colors on this item.
  Fade_colors:
    - "38,10,21"
    - "150,58,0"
  # type of effect like BALL or CREEPER.
  Type: ball
  # if the item shall have flicker or not.
  Flicker: false
  # if the item shall have trail or not.
  Trail: true
# Hide the effect in the lore.
Hide_item_flags:
  - HIDE_POTION_EFFECTS

Banner

Set banner patterns. See here for patterns.

Icon: white_banner
# add patterns.
Banner_pattern:
  # sett how many banner pattern´s you want,
  # like this: pattern: color
  CIRCLE_MIDDLE: RED
# Hide the effect in the lore.
Hide_item_flags:
  - HIDE_POTION_EFFECTS

Banner on shield

Set banner patterns.

Icon: shield
# add patterns.
Banner_pattern:
  # sett how many banner pattern´s you want,
  # like this: pattern: color
  CIRCLE_MIDDLE: RED
# Hide the effect in the lore.
Hide_item_flags:
  - HIDE_POTION_EFFECTS

Unbreakable

Set this to true for item shall be unbreakable

Unbreakable: true

Lore

Set lore on this item, if you want to use hex click on the link.

Lore:
  - "first line"
  - "second line"

Display name

Set Display name on this item, if you want to use hex click on the link.

Display_name: "Display name"

Hide_item_flags

Hide some data from lore. Support array of flags you want to set.

Hide_item_flags:
  - HIDE_ENCHANTS
  - HIDE_POTION_EFFECTS

Commands

Click actions on the item. Check actions for what you can do.

# This is all types of clicks corresponding to the requirement
Click_commands:
  - '[message] &6Anny button trigger this'
Left_click_commands:
  - '[message] &7Left click'
Right_click_commands:
  - '[message] &4Right click'
Left_shift_click_commands:
  - '[message] &4Left and shift click'
Right_shift_click_commands:
  - '[message] &4Right and shift click '
# Is not working in newer minecraft versions (1.18+)
Middle_click_commands:
  - '[message] &7Middle click'

Requirements

Requirements on the item when view or clicking on it. Check requirements here.

# View_requirement:
# Right_click_requirement:
# Shift_left_click_requirement:
# Shift_right_click_requirement:
# Click_requirement:
# Middle_click_requirement:
Left_click_requirement:
  Requirement:
    # you can set several requirements but every one
    # need to be unique named.
    require_name:
      # check Requirements tab.
  # stop on first requirement some return true.
  stop_at_success: true
  # number of requirement some need return true.
  # only works if optional_requirement is set to true.
  minimum_requirement: 1
  # only works with click requirement and open.
  deny_commands:
    - "[ACTION] your command or message here" 

This options below depending how you implement the Api.

Refresh buttons

Use this to refresh all buttons in the menu.

Refresh_buttons: true

Refresh clicked button

Use this to refresh clicked button in the menu.

Refresh_clicked_button: true

Update button delay

Time between every update of the button in seconds.

Update_Button_delay: 5

Menu to open

If this menu shall open other menu when item is pressed.

Menu_to_open: "menu name"