#How to make item in menu run command?

1 messages · Page 1 of 1 (latest)

glossy crane
#

Im starter, and im asking how to make in menu to item run command? i want to my menu do rtp, spawn, and home

potent verge
#
menu_title: 'title'
open_command: cmd
register_command: false # set this to true for tab completion of command. REQUIRES RESTART! 
size: 13

items:
  rtp:
    material: GREEN_WOOL
    slot: 13
    item_flags:
    - HIDE_ATTRIBUTES
    display_name: '&a&lRANDOM TELEPORT!'
    lore:
    - ''
    - '&aClick to teleport randomly in overworld!'
    - ''
    left_click_commands:
    - '[console]/[player] <command to rtp>' # use console or player either depending on your command case
    - '[message] <text>'
    - '[close]'
    right_click_commands:
    - '[console]/[player] <command to rtp>' # use console or player either depending on your command case
    - '[message] <text>'
    - '[close]'
#

basic example for rtp

glossy crane
#

okay thx

potent verge
#

👍

glossy crane
#

menu_title: '&6&lNäin pääset alkuun'
open_command: cmd
register_command: false # set this to true for tab completion of command. REQUIRES RESTART!
size: 13

items:
rtp:
material: EMERALD
slot: 13
item_flags:
- HIDE_ATTRIBUTES
display_name: '&a&lSATUNNAISTELEPORTTI!'
lore:
- ''
- '&aKlikkaa, niin teleporttaat satunnaiseen sijaintiin!'
- ''
left_click_commands:
- '[player] rtp' # use console or player either depending on your command case
- '[message] Teleporttasit'
- '[close]'
right_click_commands:
- '[player] rtp' # use console or player either depending on your command case
- '[message] Teleporttasit'
- '[close]'
spawn:
material: DIAMOND
slot: 16
item_flags:
- HIDE_ATTRIBUTES
display_name: '&a&lSPAWN!'
lore:
- ''
- '&aKlikkaa, niin teleporttaat spawnille!'
- ''
left_click_commands:
- '[player] spawn' # use console or player either depending on your command case
- '[message] Teleporttasit'
- '[close]'
right_click_commands:
- '[player] spawn' # use console or player either depending on your command case
- '[message] Teleporttasit'
- '[close]'
koti:
material: RED_BED
slot: 10
item_flags:
- HIDE_ATTRIBUTES
display_name: '&a&lKOTI!'
lore:
- ''
- '&aKlikkaa, niin teleporttaat omaan kotiisi!'
- ''
left_click_commands:
- '[player] home' # use console or player either depending on your command case
- '[message] Teleporttasit'
- '[close]'
right_click_commands:
- '[player] home' # use console or player either depending on your command case
- '[message] Teleporttasit'
- '[close]'

#

i customized it like this, now this doesnt work

potent verge
#
menu_title: '&6&lNäin pääset alkuun'
open_command: cmd
register_command: false # set this to true for tab completion of command. REQUIRES RESTART! 
size: 13

items:
  rtp:
    material: EMERALD
    slot: 13
    item_flags:
    - HIDE_ATTRIBUTES
    display_name: '&a&lSATUNNAISTELEPORTTI!'
    lore:
    - ''
    - '&aKlikkaa, niin teleporttaat satunnaiseen sijaintiin!'
    - ''
    left_click_commands:
    - '[player] rtp' # use console or player either depending on your command case
    - '[message] Teleporttasit'
    - '[close]'
    right_click_commands:
    - '[player] rtp' # use console or player either depending on your command case
    - '[message] Teleporttasit'
    - '[close]'
  spawn:
    material: DIAMOND
    slot: 16
    item_flags:
    - HIDE_ATTRIBUTES
    display_name: '&a&lSPAWN!'
    lore:
    - ''
    - '&aKlikkaa, niin teleporttaat spawnille!'
    - ''
    left_click_commands:
    - '[player] spawn' # use console or player either depending on your command case
    - '[message] Teleporttasit'
    - '[close]'
    right_click_commands:
    - '[player] spawn' # use console or player either depending on your command case
    - '[message] Teleporttasit'
    - '[close]'
  koti:
    material: RED_BED
    slot: 10
    item_flags:
    - HIDE_ATTRIBUTES
    display_name: '&a&lKOTI!'
    lore:
    - ''
    - '&aKlikkaa, niin teleporttaat omaan kotiisi!'
    - ''
    left_click_commands:
    - '[player] home' # use console or player either depending on your command case
    - '[message] Teleporttasit'
    - '[close]'
    right_click_commands:
    - '[player] home' # use console or player either depending on your command case
    - '[message] Teleporttasit'
    - '[close]'
glossy crane
#

thx, im sorry bc im noob

potent verge
#

its okay