Click actions
EasyMenu 6 uses action to describe what happens after a player clicks an item.
Legacy command values still work, but action is recommended for new menus.
Player command
action:
type: player-command
command: "spawn"
type: command behaves the same way.
The leading / is optional.
Open another menu
action:
type: open-menu
menu: shop
Use the menu ID rather than a path such as sub/shop.yml.
Show a message
action:
type: message
message: "&aOpening the shop."
Close the menu
action:
type: close-menu
Run multiple actions
actions runs several actions from top to bottom.
actions:
- type: message
message: "&aMoving to the lobby."
- type: player-command
command: "spawn"
Do not use action and actions on the same item.
Request chat input
action:
type: input
prompt: "Enter an amount."
input-type: integer
min: 1
max: 1000000
timeout-seconds: 60
command: "money pay admin {input}"
The player's answer replaces {input}.
| Setting | Description |
|---|---|
prompt | Message asking the player for a value |
input-type | string, integer, or decimal |
min | Minimum numeric value |
max | Maximum numeric value |
timeout-seconds | Number of seconds to wait. Must be 1 or greater |
command | Player command run after input. Must contain {input} |
The player can enter cancel to stop.
The old input request ends when it times out, the player leaves, or a new request begins.
Conflicting settings
| Combination | Result |
|---|---|
command and action | Use action and show a warning |
action and actions | Stop reload with a configuration error |
location and slot | Use slot and show a warning |
A failed reload does not remove the last working menu.