Plugins
Customization
McmmoGui gives you the power to customize every aspect of it with ease.
GUI layout files
Every menu is described by one YAML file inside the McmmoGuiV2/gui/ folder. The file defines the shape of the menu (rows, buttons, materials, slots, sounds), while the language file provides the text. We call these files GUI templates.
| Layout | File | Opened by |
|---|---|---|
SkillOverview | gui/SkillOverview.yml | /mgui |
LanguageSelector | gui/LanguageSelector.yml | /mgui language |
PlayerRanking | gui/PlayerRanking.yml | /mgui top [skill] |
FishingTreasure | gui/FishingTreasure.yml | The Treasure Hunter button in the Fishing GUI |
<Skill> | gui/abilities/<Skill>.yml | /mgui skill <skill>, /mining, /axes, ... |
The list of layouts is fixed. Dropping a new .yml file into the gui/ folder does nothing, the plugin only loads the files listed above. To add content, add buttons to an existing layout.
Layout file anatomy
Gui:
Rows: 6 # Menu height, 1 to 6. Total slots = Rows x 9
Sound: # Played when the menu opens
Value: ui.button.click
Pitch: 2
FeatureButtons: # Buttons the plugin drives (skills, party, ranking, ...)
Swords:
Material: IRON_SWORD
Slots: [10]
Flags: ["*"]
DecorationButtons: # Static buttons, fillers, links, your own buttons
Corner:
Slots: [46, 52]
Material: BLACK_STAINED_GLASS_PANE
HideTooltip: trueFeature buttons are the ones the plugin looks up by name and fills with live data (a skill, a leaderboard entry, the party panel). Decoration buttons are not wired to any plugin logic, which makes them the safe place for your own additions.
Both sections share one namespace. A key used in FeatureButtons and again in DecorationButtons collides, and the decoration one wins. Keep every button key unique inside a file.
Slots are 0-indexed, starting from the top-left corner. A slot number greater than or equal to Rows x 9 is silently ignored, so raise Rows before using a slot in a new row.
Button properties
| Property | Description | Example |
|---|---|---|
Name | Display name of the item. MiniMessage and placeholders supported. Overridden by the language file when that button has a language entry, see Name and lore. | <yellow>Server Shop |
Lore | List of lore lines. Same rules as Name. | ["<gray>Click to open"] |
Material | Item material. Supports Bukkit materials, head-<base64>, head-<username>, head-%player% | DIAMOND_SWORD, head-%player% |
Amount | Item stack amount. | 1, 64 |
Sound | Sound played on click. Either a sound key string, or a section with Value, Volume, Pitch, Source. | minecraft:ui.button.click |
Slots | List of slot numbers (0-indexed) for button placement. Set it to [-1] to disable the button. Slots beyond Rows x 9 are ignored. | [10], [11, 12] |
ModelData | Custom Model Data for resource packs. | 1001 |
Glow | Make item glow with enchantment effect. | false, true |
Flags | ItemFlags to apply. Use [*] to hide all flags. | ["HIDE_ATTRIBUTES"], ["*"] |
HideTooltip | Hide item tooltip (1.20.6+). | false, true |
ItemModel | Namespaced key for custom item models (1.21+). | minecraft:custom_sword |
TooltipStyle | Namespaced key for tooltip styles (1.21+). | minecraft:custom_style |
Enable | Enable/disable the button. | false, true |
Commands | A list of actions that run when you click the button, see Click actions. | ["weather clear"] |
Clickable | Disable button interaction. | false, true |
An unknown material falls back to BARRIER, which is the quickest way to spot a typo in-game. For head-<username>, a name the server has never seen falls back to the skin defined by Settings.OfflinePlayerSkinValue in settings.yml.
Layout-specific keys
A few keys are only read by one layout.
| Key | Used in | Description |
|---|---|---|
Position | gui/PlayerRanking.yml buttons | Rank this button renders on the current page. The highest Position in the file is the page size. |
Locale | gui/LanguageSelector.yml buttons | Locale code applied when the button is clicked, for example vn-vi. |
Skills | The ChangeSkill button | List of leaderboard categories the button cycles through. |
Gui.SkillDetailSlots | Ability GUIs | Slots of the skill summary button borrowed from the overview menu. [-1] hides it. |
Gui.PlayerTopSlots | Ability GUIs, PlayerRanking | Slots of the leaderboard button. [-1] hides it. |
Gui.PlayerInfoSlots | Ability GUIs, PlayerRanking | Slots of the player head button. [-1] hides it. |
Gui.TreasureButton.Slots | gui/FishingTreasure.yml | Slots the treasure entries are paginated into. |
Adding a new button
The example below adds a shop button to the skill overview menu.
Pick a free slot
Open gui/SkillOverview.yml and look at the Slots of the existing buttons. The layout uses 6 rows, so slots 0 to 53 are valid. Slot 45 is free in the default layout.
Add your button under DecorationButtons
The key can be anything, as long as no other button in the file uses it. Custom buttons belong under DecorationButtons because the plugin never overwrites them.
Give it a material, a name and a lore
Written directly in the template, no language file needed.
Add the click actions
Each entry runs in order, top to bottom.
DecorationButtons:
# ... the shipped buttons stay untouched
Shop:
Slots: [45]
Material: EMERALD
Glow: true
Flags: ["*"]
Name: "<green>Server Shop"
Lore:
- "<gray>Sell what you farmed with"
- "<gray>your mcMMO skills."
- ""
- "<dark_gray>Click to open the shop"
Sound:
Value: ui.button.click
Pitch: 2.0
Commands:
- "[close]"
- "[player] shop"Reload
Run /mgui reload and reopen the menu. No restart needed.
Do not reuse a key the plugin already drives, it will overwrite your name, lore or click action. Reserved keys include Close, Back, Player, PlayerTop, HasParty, NoParty, Prev, Previous, Next, ChangeSkill, DefaultTop, EmptyTop, DefaultSkillFormat, DefaultAbilityFormat, LanguageSelector, every Language_* key, every skill name (Mining, Swords, ...) and every ability key (DOUBLE_DROPS, SUPER_BREAKER, ...).
Name and lore
A button's text can come from two places.
Write Name and Lore straight into the button block. This is the recommended path for your own buttons, and for any server that only runs a single language, since it keeps everything in one file instead of six.
Shop:
Slots: [45]
Material: EMERALD
Name: "<green>Server Shop"
Lore:
- "<gray>Sell what you farmed with"
- "<gray>your mcMMO skills."Which one wins
For each button the plugin resolves the text in this order.
NameandLorefrom the GUI template are read first.- If the player's language file has a section for that button, its
NameandLorereplace them. - The GUI then fills in the per-button tokens (
%name%,%level%,%stats%,%description%,%abilities%, ...). - Finally the plugin's own placeholders, then PlaceholderAPI, then MiniMessage are applied.
A button with no language entry, which is the case for every button you add yourself, keeps the text from the template. That is why a custom button needs nothing more than the Name and Lore lines shown above.
Keep Name and Lore for one button in a single file. If the language file has a section for a button that sets Name but no Lore, the lore is replaced with an empty list and the lore written in the template disappears.
The skill buttons on the overview menu, and the ability buttons in each skill menu, are generated from the shared DefaultSkillFormat and DefaultAbilityFormat entries. Add a section named after that skill or ability in the language file (for example Gui.SkillOverview.FeatureButtons.Mining) and the plugin stops applying the shared format to it, letting you write a fully custom name and lore for that one button.
Styling name and lore
All text goes through MiniMessage, so colors, gradients, hover and click events work everywhere. Item text is rendered without the vanilla italics.
| Tag | Notes |
|---|---|
<green>, <#f1c40f>, <gradient> | Standard MiniMessage colors. |
<small:text> | Renders the text in small caps. Set Settings.SmallCapsTag to false to print it as written instead. |
<head:username>, <mhead:...> | Inline player head. Requires Paper 1.21.9+, renders as nothing on older builds. |
<click:open_url:'...'> | Works in chat messages sent by a button action. |
The tags a server allows are controlled by Settings.AllowMiniMessageTags in settings.yml. The default is ALL. If you replace it with an explicit list, keep at least CLICK and DECORATION, the shipped layouts need them.
Built-in placeholders
These are resolved by McmmoGui itself, before PlaceholderAPI runs, and work in names, lore, materials, titles and click actions.
| Placeholder | Description |
|---|---|
%player%, %player-name% | Name of the player viewing the menu. |
%player-display-name% | Display name, as plain text. |
%player-uuid% | UUID of the player. |
%player-world% | World the player is in. |
%player-language% | Display name of the language the player selected. |
%player-locale% | Locale code of that language, for example en-us. |
Any other placeholder is handed to PlaceholderAPI, so every expansion installed on your server works here too. See Placeholders for the ones McmmoGui provides.
Click actions
The Commands list holds what happens when the button is clicked. Each entry may start with a tag.
| Entry | Description | Example |
|---|---|---|
[close] | Close the menu. | "[close]" |
[sound] <sound> [volume] [pitch] | Play a sound. Volume and pitch default to 1. | "[sound] ui.button.click 1 2" |
[player] <command> | Run the command as the player. | "[player] spawn" |
[console] <command> | Run the command from the console. | "[console] give %player% diamond 1" |
[message] <text> | Send a MiniMessage line to the clicker. | "[message] <green>Enjoy!" |
| No tag | Runs as the player, same as [player]. | "spawn" |
console: <command> | Old syntax, still supported, same as [console]. | "console: say hi" |
Good to know:
- A leading
/in a command is stripped for you, both syntaxes work. - Entries run in the order they are listed, after the button's own
Sound. - Placeholders are resolved at click time, so
%player%is the player who clicked. - An unknown tag is skipped and a warning naming the button is printed in the console.
Clickable: falseblocks every action on the button, useful for pure display items.
The shipped Docs button is a complete example of the three most used tags.
Docs:
Slots: [51]
Material: BOOK
Commands:
- '[close]'
- '[sound] ui.button.click 1 2'
- "[message] <green>ā <white>Visit our docs: <u><green><click:open_url:'https://mcmmo.hyronic.dev/'>https://mcmmo.hyronic.dev/</click>"Hiding a button
| Option | Result |
|---|---|
Slots: [-1] | Button keeps its config but is never placed. The usual way to remove a shipped button. |
Enable: false | Same result, reads better when you plan to switch it back on later. |
HideTooltip: true | Button is shown but has no tooltip at all. Used by the glass pane fillers. |
Clickable: false | Button is shown with its text, but clicking does nothing. |
Applying your changes
Run /mgui reload to reload every GUI template, language file and setting without restarting. The only change that still needs a full server restart is renaming a command or its aliases in settings.yml.
Last updated on
Placeholders
PlaceholderAPI is supported everywhere that text can be used in the plugin. In addition, we also provide many standalone placeholders that you can use in other plugins.
Installation
With a simple and closely aligned aesthetic to Vanilla Friendly Minecraft, this will be the only resource you need to elevate the custom enchant playstyle of your server.