Custom Menus
Custom Menus are a special feature added by MythicMobs Premium (or by using MythicRPG with MythicMobs free) that allows you to make, well, custom menus!
This feature requires either MythicMobs Premium or MythicRPG to be used!
Creating Menus
You can create menus by placing them in any .yml file inside a menus folder in any mythic pack.
For example, you can create a new .yml file at plugins/MythicMobs/menus/custom_menus.yml.
Any top-level node will be loaded as a menu using the standard Mythic menu format. For example, to create a menu named MyCustomMenu you'd place this in the file:
MyCustomMenu:
Display: "My Custom Menu"
Size: 27
Shared: false # Whether the Menu should not be cached and shared across players
Schema:
- '1 1 1 1 1 1 1 1 1'
- '0 0 0 0 B 0 0 0 0'
- '1 1 1 1 1 1 1 1 1'
Icons:
FILLER:
Mapping: 1
Material: RED_STAINED_GLASS_PANE
Display: ''
Model: 1
TEST_BUTTON:
Mapping: B
Material: GOLD_INGOT
Model: 4
Display: 'Test'
Skills:
- sound{s=entity.chicken.egg}
- setcustommenubutton{slot=11;icon=DYNAMIC_BUTTON}
- message{m="you hit me"} @self
DYNAMIC_BUTTON:
Material: IRON_SWORD
Model: 100
This example includes many of the features of the custom menu system.
The Schema defines how the menu looks - it's basically a 9 x height grid representing the menu's icons. Each letter/number is mapped to one of the icons defined under the Icons section.
For example, any slot in the Schema with 1 is mapped to FILLER:
FILLER:
Mapping: 1
Icons contain:
Mapping: a letter or number used to map the icon to the schemaMaterial: the Material of the iconModel: the CustomModelData of the iconDisplay: the Display Name of the iconLore: a list of lines of loreSkills: Skills executed when the button is pressedHideFlags: Whether to hide all item flags, making things like attributes or enchantments not visible in the icon's tooltip. Defaults totrue, or tofalsewhen aHidelist is presentHide: A list of specific tooltip sections to hide, using the same syntax as items. Setting it makes it the icon's flag list, so settingHideFlags: truealongside it still hides everythingGlint: Whether the icon has the enchantment glint visual effect, like the item option. Defaults tofalseEnchantments: A list of enchantments applied to the icon, using the same syntax as itemsTooltipStyle: The resource location of the icon's custom tooltip sprites, like the item component. Requires Paper 1.21.3 or newer
SWORD_BUTTON:
Mapping: S
Material: DIAMOND_SWORD
Display: 'Epic Sword'
Hide:
- ATTRIBUTES
Glint: true
Enchantments:
- SHARPNESS 5
- KNOCKBACK 1
TooltipStyle: minecraft:verycooltooltip
Modifying a Menu
You can modify an open menu using the setcustommenubutton{slot=11;icon=ICON} mechanic
Opening Menus
To open a custom menu you've created, you can use one of the following:
Command-/mm menus open [menu] <player>Mechanic- theopenCustomMenu{menu=name}mechanic
Button Skills
As shown above, each button in the menu can have a set of skills associated with it. Once the button is clicked, the skills are executed.
| Implemented Placeholders |
|---|
<skill.var.click-type> |
Skills:
- sound{s=entity.chicken.egg}
- message{m="<skill.var.click-type>"} @self