Menu
This file defines the visual structure, layout, and functionality of all GUIs in CatzFly.
This file defines the visual structure, layout, and functionality of all GUIs in CatzFly. It controls which items appear where, what they look like, and what happens when a player clicks them. While it's designed to work hand-in-hand with language.yml, you also have the option to define text directly here.
Menu Structure
Each menu you define (e.g., profile-menu) has four main parts: title-key, size, layout, and items.
title-key: This links to a key inlanguage.ymlto get the menu's title, allowing it to use placeholders.size: The total number of slots in the inventory. This must be a multiple of 9 (e.g., 27, 54).layout: A visual representation of the menu's grid. Each character in the layout corresponds to an item defined in theitemssection below.items: This section is where you define each character used in the layout.
Item Definitions
name / name-key
Defines the item's name. Use name-key to link to language.yml (recommended) or name to set it directly.
lore / lore-key
Defines the item's lore. Use lore-key to link to language.yml (recommended) or lore for a direct definition.
material / materials
The item's material. Use materials with ENABLED/DISABLED states for toggle items.
action
The internal action performed when the item is clicked (e.g., OPEN_SETTINGS_MENU).
sound
The sound played when the item is clicked.
skull-owner
(For PLAYER_HEAD only) Can use the {player_name} placeholder to display the viewer's head.
💡 Tip: Direct Text vs. Language File
You have two options for setting item names and lores, giving you full flexibility.
name-key&lore-key(Recommended Method): This method links to yourlanguage.ymlfile. It is the best practice for keeping yourmenu.ymlclean and making future translations or large-scale text changes much easier.name&lore(Direct Method): If you prefer, you can set the text directly insidemenu.yml. This can be quicker for simple, single-language servers or for testing purposes.
Important: The plugin will always prioritize the -key version. If name-key is found, it will be used; otherwise, the plugin will look for a name property.
items:
# Method 1: Using language.yml keys (Recommended)
settings-button:
material: COMPARATOR
name-key: "profile-menu.items.settings.name"
lore-key: "profile-menu.items.settings.lore"
action: "OPEN_SETTINGS_MENU"
# Method 2: Defining text directly in menu.yml
close-button:
material: BARRIER
name: "&cClose Menu"
lore:
- "&7Click here to close this menu."
action: "CLOSE"Last updated