usage/Editing Menu Items

Overview

You can edit existing items in a menu with the /sms edit command. This is mainly a convenience to avoid having to remove the item and then add it back at a specific position (or having to edit the YAML menu definition file manually).

The /sms edit command takes the following form:

/sms edit <menu-name> <item-position-or-label> <options...>

item-position-or-label is either the label of the item you want to edit (case insensitive, use double quotes if the label contains whitespace), or its numeric position indexed from 1, and starting with a '@'. E.g. "@5" means the fifth item in the menu.

Accepted options are:

  • -label <new-label>: Change the item's label
  • -command <new-command>: Change the command that will be run when the item is clicked
  • -altcommand <command>: The alternative command to use (accessing this alternative command depends on the view type and the configured action bindings; by default shift-left-click is used).
  • -icon <material-name>: Change the material used for the item's icon (currently only used in inventory views) - e.g. "apple", "wool:black", "3" (numeric material ID's are allowed)
  • -feedback <text>: Change the feedback message sent to the player when the item is clicked.
  • -lore <text>: Change the lore (tooltip) text associated with the menu item. See Item Tooltips for more information.
  • -move <new-position>: Move the menu item to be at the new position in the menu
  • -perm <permission-node>: The player must have the given permission node to use (and depending on the view type, even see) this menu item.

Examples

Say a new item has been added at position 5, but contains a typo:

/sms add mymenu "Sya Hello" "/say Hello everyone!"
/sms edit mymenu @5 -label "Say Hello"

This replaces the item at position 5 with the new label.

You can also use the item label to identify the item to be edited:

/sms edit mymenu "Say Hello" -command "/say Good day everyone!"

To add a glowstone icon to a menu item:

/sms edit weather Sunny -icon glowstone

Comments

Posts Quoted:
Reply
Clear All Quotes