-
Notifications
You must be signed in to change notification settings - Fork 1
GUI Menus
The GUI file is located under: /plugins/PLUGINNAME/Language
PlaceholderAPI placeholders are supported in all menus, titles, items and commands.
You can use hex colors by inserting them in this format: {hex}
Example: {#4287f5}
You can combine slot ranges. This includes slots for items and slots for list entries. Example:
slots:
- '1-5'
- '7'
- '8-9'
It's exactly the same for the list menus entries definitions:
entries:
- '1-5'
- '7'
- '8-9'
Item keys starting with the "entry_" prefix apply to list menus in the defined entries ranges.
Child items appear as feedback when clicking on specific items. For example, letting a player know that they can't untrust a claim owner. These items are temporary and will disappear after 1.5 + 1.5 * lore length seconds.
These items trigger a complete refresh of the menu when clicked. In the default configuration, they're mostly used in list menus.
Item keys starting with the "placeholder_" prefix are placeholders.
The common section lets you define items that will apply to every menu. Items in the default configuration may not apply to every menu. Only menus that they're meant to apply. In the default configuration, all menus have the same size of 45. Therefore, this size is specified here. You can override any item or setting of the common section in the menu of your choice, by following the instructions here: How to add your own items.
common:
size: 45
entries: 10-36
# Automatically correct slots if menus, that inherit items from this section, have a smaller size?
# If this is disabled, items, which slots go over the menu size, will be set to slot 0 instead.
# To manually override the slots for a common item in a menu,
# just define this item in the custom section of the menu.
auto-correct: true
items:
default:
back:
name: '&c&lBack'
lore:
- '&8✖ &7Go back to'
- ' &7{back}.'
material: RED_STAINED_GLASS_PANE
slots: 37
refresh_page_previous:
name: '&c&lPrevious Page'
lore:
- '&8✖ &7Go to previous page:&3 {previous}'
material: ARROW
slots: 39
refresh_page_next:
name: '&a&lNext Page'
lore:
- '&8✖ &7Go to next page:&3 {next}'
material: ARROW
slots: 44
placeholder_1:
material: GRAY_STAINED_GLASS_PANE
slots: 1-45
All of our GUI menus feature full customization of the whole item language and also positions etc.
Here are some hidden features:
Add enabled: false to the item.
Add model-data: NUMBER to the item.
Add amount: NUMBER to the item.
Add enchanted: true to the item.
This supports PlaceholderAPI placeholders.
item:
name: 'Name'
lore:
- 'Lore'
material: STONE
slots: 26
commands:
- 'say test'
- Add the
customsection to the menu in your GUI file. - Configure the in the same format as default items. You can also override items from the common section.
main:
title: '&8Main Menu'
items:
default:
lands:
name: '&2&lYour Lands'
lore:
- '&8✖ &7Manage your lands:'
- ' &7This includes your own lands'
- ' &7and lands, in which you''re'
- ' &7trusted.'
- ''
- ' &8• &7Own: {own}'
- ' &8• &7Trusted: {trusted}'
material: GRASS_BLOCK
slots: 20
custom:
my-item:
name: 'Name'
lore:
- 'Lore'
material: STONE
slots: 26
If you get a warning in your console that items have conflicting slot ranges, you need to edit your GUI file. Find the conflicting items and edit their slots in a way that they don't overlap and don't exceed the size of the menu. Otherwise, items might not display correctly.