Creating and Using Inventory Files
In this section, you'll learn how to define an inventory layout using a YAML file and how to load it using zMenu.
Goal
Step 1: Create a YAML Inventory File
name: "&8Example &f%page%&8/&f%max-page%"
size: 18
buttons:
basic:
type: BASIC_EXAMPLE
slot: 10
key-example: basic
item:
material: DIAMOND
name: "&7Basic"
pagination:
type: PAGINATION_EXAMPLE
slots:
- 0-8
item:
material: BOOK
name: "&7Book&8: &f%book%"
next:
type: NEXT
slot: 17
item:
material: ARROW
name: "&7Next page"
previous:
type: PREVIOUS
slot: 9
item:
material: ARROW
name: "&7Previous page"Explanation
Step 2: Load the Inventory in Your Plugin
Step 3: Open the Inventory in Your Code
Tips
Result
Last updated