# GUI Customization Every menu in CelestialCosmetics — the main menu, category browsers, the Actions menu, the Auction House, and the Crates menu — is rebuildable from configuration. Nothing is hardcoded: any button or icon can be **moved**, **restyled**, or **hidden entirely**. ## The Core Pattern Almost every configurable element follows the same structure: ```yaml some.button.path: enabled: true # false = hide it completely (and disables the click too) slot: 22 # move it to this slot (validated against the menu's real size) material: GRAY_DYE custom-model-data: 0 name: "&7Some Text" lore: - "&8An extra line" texture: "eyJ0..." # only used if material: PLAYER_HEAD ``` `enabled: false` doesn't just hide the item visually — clicking that slot does nothing, because the same resolved slot is used both to place the button and to detect the click. Moving a button in config automatically moves where clicks are handled too; there's no way for them to desync. If a configured `slot` doesn't fit the menu it's being drawn in (for example, a slot of 45 configured for a menu that's only 27 slots big), the plugin safely falls back to a sensible default position instead of throwing an error. ## Main Menu (`config.yml → menu`) ```yaml menu: main-title: "&8Cosmetics" main-size: 27 filler: enabled: true material: BLACK_STAINED_GLASS_PANE categories: tag: slot: 10 material: NAME_TAG name: "&#F5F537&lTags" rebirth: slot: 11 material: END_CRYSTAL name: "&#F5F537&lRebirth Color" # ...namecolor, rankcolor, chatcolor, emoji, set empty: enabled: true material: GRAY_DYE name: "&7You don't own any of these yet" ``` Each category button supports `enabled: false` to remove a whole category from the menu (and from the click-routing) if you don't want players accessing it — for example, disabling Chat Color entirely on a server that doesn't wire that placeholder into chat. The Auction House and Crates buttons on the main menu are configured under `auction.menu` and `crates-menu` respectively, following the exact same pattern (`slot`, `enabled`, `material`, `name`, `lore`, `texture`). ## Category Submenus ```yaml menu: category-size: 54 category-title: "&8Cosmetics » {category}" content-slots: [] # [] = automatic layout (rows 1-4, columns 1-7) # or specify exact slots: [10,11,12,13,14,15,16, 19,20,...] buttons: back: slot: 45 material: ARROW previous: slot: 48 next: slot: 50 clear: slot: 49 material: BARRIER ``` `content-slots` controls **both** where cosmetics appear **and** how many fit per page — set it to a custom list to build a 2-row compact layout, a diamond shape, or anything else your resource pack's menu texture calls for. ## The Actions Menu (Equip / Withdraw / Auction) Opened when a player clicks a cosmetic in their vault. ```yaml menu: actions-buttons: item: slot: 13 equip: slot: 11 withdraw: enabled: true slot: 15 auction: enabled: true slot: 20 back: slot: 22 ``` ## Confirmation Menus Used for both "confirm Auction House purchase" and "confirm paying to open a crate" — same config keys, shared behavior: ```yaml menu: confirm-buttons: item: slot: 13 confirm: slot: 11 material: LIME_CONCRETE cancel: slot: 15 material: RED_CONCRETE ``` ## Crates Menu ```yaml menu: preview-buttons: open-key: slot: 48 buy: slot: 50 ``` The crate list itself uses the same `content-slots` system as category submenus. ## Removing the Filler for Custom Resource Packs If you're building menus entirely out of custom textures (ItemsAdder/Oraxen/Nexo), turn off the glass-pane background entirely: ```yaml menu: filler: enabled: false ``` Combine this with `custom-model-data` on every button and a fully custom `content-slots` layout to recreate any menu design your resource pack defines. ## Custom GUI Lore Text All static lore lines shown in menus (category descriptions, "you own Nx", "click to equip", etc.) are editable in `messages.yml` under `menu-lore`: ```yaml messages: menu-lore: category: - "&7Selected: {selected}" - "&7Unlocked: &f{unlocked}&7/&f{total}" cosmetic-owned: - "&7You own: &#F5F537{quantity}x" cosmetic-access-only: - "&7Access granted by your rank or a set" ``` --- Next: [Admin Tools](Admin-Tools.md)