Profile Menu Config
Configuration for the profile selection menu
Configuration entry for the profile menu system. Provides full customization of the profile selection interface.
字段
| 字段 | 类型 | 默认值 | 描述 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
inventoryTitle | String | <dark_gray>Mes Profils | Title of the menu. Placeholders: {player}, {profile_count}, {max_profiles}占位符颜色 | ||||||||||||||||
inventoryRows | Int | 6 | Number of rows in the inventory (1-6). | ||||||||||||||||
guiType | GuiType | CUSTOM | Type of the GUI (CUSTOM, ANVIL, HOPPER, etc.). | ||||||||||||||||
alternativeMenuTrigger | List<Ref<TriggerableEntry>> | empty | Optional alternative menu backend. When set, opening the profile menu (including the forced first-join selection) triggers these actions INSTEAD of the built-in GUIExtension menu. Point this at an AdvancedMenus screen-menu action to use the 3D cursor menu for profile create/switch/delete. Leave empty to use the built-in GUI. | ||||||||||||||||
layoutPool | List<LayoutData> | empty | Pool of layout definitions. Items with `profileButtonType` are resolved dynamically. Use `profileButtonType: "PROFILE_SLOT"` at the positions where you want profiles to appear. | ||||||||||||||||
mainLayoutId | String? | — | ID of the main layout to display from the pool. | ||||||||||||||||
views | List<MenuViewData> | empty | Écrans adressables de ce menu. Les frames en '@view' et les slots taggés 'view:<id>' se résolvent contre la vue active. | ||||||||||||||||
defaultViewId | String? | — | Vue ouverte en premier. Vide = la première vue déclarée. | ||||||||||||||||
breadcrumbSeparator | String | — | Séparateur MiniMessage inséré entre les segments du fil d'Ariane par le token {breadcrumb}.颜色 | ||||||||||||||||
baseMenuId | String | — | Entrée open_gui servant de châssis partagé : son layoutPool et ses vues fusionnent sous les nôtres. | ||||||||||||||||
audio | GuiAudioData | — | Audio configuration for the GUI navigation (Open, Close, Scroll, Click). | ||||||||||||||||
activeProfileTemplate | ProfileItemTemplate | — | Template for displaying the ACTIVE profile. Placeholders: {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}
|
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
item | Item | — | Base item to display. |
lore | List<String> | empty | Lore lines. Placeholders: {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}, {max_profiles}占位符颜色多行 |
glowing | Boolean | false | Whether the item should glow (enchantment effect). |
inactiveProfileTemplateProfileItemTemplateProfileItemTemplate(3)
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
item | Item | — | Base item to display. |
lore | List<String> | empty | Lore lines. Placeholders: {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}, {max_profiles}占位符颜色多行 |
glowing | Boolean | false | Whether the item should glow (enchantment effect). |
createProfileTemplateProfileItemTemplateProfileItemTemplate(3)
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
item | Item | — | Base item to display. |
lore | List<String> | empty | Lore lines. Placeholders: {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}, {max_profiles}占位符颜色多行 |
glowing | Boolean | false | Whether the item should glow (enchantment effect). |
maxProfilesTemplateProfileItemTemplateProfileItemTemplate(3)
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
item | Item | — | Base item to display. |
lore | List<String> | empty | Lore lines. Placeholders: {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}, {max_profiles}占位符颜色多行 |
glowing | Boolean | false | Whether the item should glow (enchantment effect). |
switchSoundSoundEMPTYcreateSoundSoundEMPTYdeleteSoundSoundEMPTYerrorSoundSoundEMPTYswitchMessageString<green>Profil <gold>{profile_name}</gold> activé !createMessageStringCREATE_MESSAGEdeleteMessageString<red>Profil <gold>{profile_name}</gold> supprimé.maxProfilesMessageStringMAX_PROFILES_MESSAGEdeleteActiveProfileMessageString<red>Vous ne pouvez pas supprimer votre profil actif !initFailedMessageStringINIT_FAILED_MESSAGEcreateAnvilTitleStringNom du profilcreateAnvilDefaultStringNouveau profilcreateNameMaxLengthInt24createTimeoutSecondsIntCREATE_TIMEOUT_SECONDSdeleteConfirmationBooleantruedeleteConfirmTitleString<red>Supprimer {profile_name} ?deleteConfirmButtonProfileItemTemplateProfileItemTemplate(3)
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
item | Item | — | Base item to display. |
lore | List<String> | empty | Lore lines. Placeholders: {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}, {max_profiles}占位符颜色多行 |
glowing | Boolean | false | Whether the item should glow (enchantment effect). |
deleteConfirmSlotInt11deleteCancelButtonProfileItemTemplateProfileItemTemplate(3)
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
item | Item | — | Base item to display. |
lore | List<String> | empty | Lore lines. Placeholders: {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}, {max_profiles}占位符颜色多行 |
glowing | Boolean | false | Whether the item should glow (enchantment effect). |
deleteCancelSlotInt15defaultMaxProfilesInt4permissionLimitsList<PermissionLimit>emptyPermissionLimit(2)
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
permission | String | — | Permission to check |
limit | Int | 1 | Number of profiles allowed when the permission is present |
onSwitchList<Ref<TriggerableEntry>>emptyonCreateList<Ref<TriggerableEntry>>emptyonDeleteList<Ref<TriggerableEntry>>emptyHow to use it
One entry describes the whole profile menu. /profile, the open menu action and the forced selection all use the first one found.
Layout. Build the menu in layoutPool and mainLayoutId like any GUI menu, with optional views and a shared baseMenuId frame. Place items with buttonPrefix profile_button: and buttonType PROFILE_SLOT where profiles must appear. Markers are read left to right then top to bottom, and each one shows one profile.
Slot states.
- A profile exists at that position:
activeProfileTemplatefor the active one,inactiveProfileTemplatefor the others. A click switches to the profile. - No profile there, but the player's limit allows one:
createProfileTemplate. A click opens the creation page. - Beyond the limit:
maxProfilesTemplate, inert.
Template names and lore accept {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}, {profile_count} and {max_profiles}. Build the template item from a material component: an item with no content shows nothing.
Limits. defaultMaxProfiles is the limit for everyone, and permissionLimits raises it for players holding a permission (the highest matching limit wins). When this entry exists it replaces profiles.max-profiles of the MySQL configuration.
Alternative menu. alternativeMenuTrigger replaces the built-in menu with other actions, for example an AdvancedMenus screen. Leave it empty to use the GUI.
Creating a profile. A click on an empty slot (or profile create solo|coop) first opens an anvil where the player types the name. createAnvilTitle is the title of the anvil and createAnvilDefault the name proposed there, also used when the player validates an empty name. The name is cleaned of formatting codes and click tags and cut to createNameMaxLength characters (24 by default). If the anvil cannot be opened, the profile is created under createAnvilDefault. Closing the anvil without validating creates nothing. When the profile is created and initialised, createMessage ({profile_name}, {profile_id}) is sent, createSound is played, the Profile Created Event fires and the onCreate triggers run. If the profile is created but its island cannot be initialised, initFailedMessage is sent instead.
While a creation is under way, the player cannot start another one. createTimeoutSeconds (120 by default, at least 5) is how long a creation that never finished (anvil closed by another plugin, no answer) keeps blocking the player; a closed anvil or a disconnection frees the player at once.
Deleting a profile. Shift + left click on a profile (or /profile delete <id>) deletes it. With deleteConfirmation on (the default), a 27-slot confirmation screen opens first: deleteConfirmTitle is its title ({profile_name}), deleteConfirmButton sits in the slot deleteConfirmSlot (11 by default) and deleteCancelButton in deleteCancelSlot (15 by default). Cancelling reopens the profile list. /profile delete <id> confirm skips the confirmation screen. The active profile cannot be deleted: the player gets deleteActiveProfileMessage instead. After a deletion, deleteMessage is sent, deleteSound is played and the onDelete triggers run.
Triggers, messages and sounds. onCreate and onDelete run whatever the way the profile was created or deleted (menu or typed commands). onSwitch runs only after a switch made with the typed /profile select command: a click on a profile in the menu does not run it, and sends its own fixed message instead of switchMessage. maxProfilesMessage is sent, with errorSound, when the limit is reached. switchSound also plays when the menu opens.
The default lore of the active and inactive profile templates says "Shift+Clic pour supprimer", which matches the Shift + left click above.