1.6 allow multiple open commands for menus, allow placeholders in new dynamic_amount option
1.6.0
Added ability to list multiple open commands for menus
If you wish to specify a list of commands, simply set your open_command entry for the menu as a list:
Code (YAML):
gui_menus:
example:
menu_title
: '&aExample GUI menu'
open_command
:
- openexamplemenu
- oem
- openmenu
- menu
size
: 9
items:
'1':
material
: head;
%player_name%
....
Note that every open_command listed must be unique.
Added new option to specify a dynamic amount for items.
You can now add a new option to your item configurations which will set an item amount to the value of a placeholder
(requires a placeholder that returns an integer)
Code (YAML):
gui_menus:
servermenu:
menu_title
: '&aServer menu'
open_command
:
- menu
- openmenu
size
: 9
items:
'1':
material
: DIAMOND
slot
: 0
dynamic_amount
: '
%server_online%' # will set this item amount to the amount of players online
left_click_commands
:
- '
[close
]'
right_click_commands
:
- '
[close
]'
Keep in mind that if the amount exceeds 64, it will be set to 64. Also note that if the placeholder did not return an integer, the amount will be set to 1 OR the amount specified in the "amount" entry if both "amount" and "dynamic_amount" exist for that specific menu in the configuration.
Added flag argument to silence /dm open messages
You can now add a flag at the end of the
/dm open command which silences message output:
Code (Text):
/dm open <menuname> -s
/dm open <menuname> <player> -s