Dokumentation
menu
A chest menu from the menus module. Slots are numbered from 0, left to right, top to bottom.
Egenskaber 9
Title given when the menu was created.
Number of rows.
Number of slots.
The underlying inventory.
Players who have this menu open.
True (the default) stops players taking items out or putting items in.
Sound played when a button is clicked (none for silence).
Current page of a paged menu, starting at 1. Assign to jump to a page.
Number of pages of a paged menu.
Metoder 15
Puts a plain item in a slot (none empties it). Removes any button there.
The item in a slot, or none.
Fills every empty slot, e.g. menu.fill("gray_stained_glass_pane").
Puts an item in every slot on the edge of the menu.
Fills a whole row. Rows start at 1.
Fills a whole column. Columns go from 1 to 9.
Removes every item and button.
Shows a list of items over as many pages as needed, with previous/next buttons in the bottom row. The handler is called as handler(player, index, ...args, [click]); index starts at 0.
Shows the next page. Returns false on the last page.
Shows the previous page. Returns false on the first page.
Calls handler(player, ...args) whenever the menu is opened with menu.open or player.open.
Calls handler(player, ...args) when a player closes the menu.
Opens the menu for a player.
Closes the menu for one player, or for everyone who has it open.