Skip to content

Main Menu Customization

datatags edited this page May 16, 2023 · 1 revision

Basics

As of UltraCosmetics 3.2, you can customize the main menu within UC itself! The file used for this is custom_main_menu.yml, which contains two config options, plus the Slots block.

When Enabled is true, the options from this file will be used. Otherwise, UC will generate the main menu automatically. Size will set the number of slots in the main menu (must be a multiple of 9 and not greater than 54.)

Slot counting

Each key in the slots section refers to the slot the item should occupy. Slots are numbered starting from 0 in the top left corner, like this:

0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16 17
18 19 20 21 22 23 24 25 26

and so on, if the inventory is larger.

Button types

The first thing you'll want to put under each slot block is the Type key, which determines what the button will look like and do. The available types are:

  • Command
  • ClearCosmetic
  • Keys
  • OpenChest
  • OpenCosmeticMenu
  • RenamePet
  • ToggleGadgets
  • ToggleMorphSelfView

Basic buttons

For all button types except Command and OpenCosmeticMenu, no fields other than Type are required. So, if you want to put a button to clear cosmetics in the center of the top row, your slots block might look like this:

Slots:
  '4':
    Type: ClearCosmetic

That's it!

Open another menu

For OpenCosmeticMenu, you just need to supply the menu to open. For example, to open the pets menu:

Slots:
  '6':
    Type: OpenCosmeticMenu
    Menu: PETS

Custom buttons

Finally, to create a completely custom button that runs a console command when clicked, you need the Command type. It's easier to show than tell for this one, so here's an example:

Slots:
  '0':
    Type: Command
    Material: BEDROCK
    Amount: 1
    Name: '&bCool bedrock'
    Lore:
      - "&a&lLore line 1"
      - "&cLore line 2 (and so on)"
    CustomModelData: 50
    CloseAfterClick: true
    Command: "sudo %player% c:Hello world!"
Clone this wiki locally