#Use playername in command.

1 messages · Page 1 of 1 (latest)

candid musk
#

I was wondering how I can use a players name such as setrank playername to pop up a menu that allow me to set the rank of the player.

sour geyser
# candid musk I was wondering how I can use a players name such as setrank playername to pop ...

DeluxeMenus has a feature called arguments. Arguments can be passed after the open command is used. For example, we have a menu with the option open_command: profile, and an argument:

args:
  - name

we then can use /profile <player_name> to open the menu and then use the argument {name} inside the menu like so:

left_click_commands:
- '[message]&eYou have opened {name}'s profile menu!'

To note is that the menu won't automatically check if the palyer name is valid

#

You can check that yourself with an open requirement however.