Zum Hauptinhalt springen

Profile Menu Config

Configuration for the profile selection menu

Configuration entry for the profile menu system. Provides full customization of the profile selection interface.

Felder

FeldTypStandardBeschreibung
inventoryTitleString<dark_gray>Mes ProfilsTitle of the menu. Placeholders: {player}, {profile_count}, {max_profiles}PlatzhalterFarben
inventoryRowsInt6Number of rows in the inventory (1-6).
guiTypeGuiTypeCUSTOMType of the GUI (CUSTOM, ANVIL, HOPPER, etc.).
alternativeMenuTriggerList<Ref<TriggerableEntry>>emptyOptional 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.
layoutPoolList<LayoutData>emptyPool of layout definitions. Items with `profileButtonType` are resolved dynamically. Use `profileButtonType: "PROFILE_SLOT"` at the positions where you want profiles to appear.
mainLayoutIdString?—ID of the main layout to display from the pool.
viewsList<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.
defaultViewIdString?—Vue ouverte en premier. Vide = la première vue déclarée.
breadcrumbSeparatorString—Séparateur MiniMessage inséré entre les segments du fil d'Ariane par le token {breadcrumb}.Farben
baseMenuIdString—Entrée open_gui servant de châssis partagé : son layoutPool et ses vues fusionnent sous les nôtres.
audioGuiAudioData—Audio configuration for the GUI navigation (Open, Close, Scroll, Click).
activeProfileTemplateProfileItemTemplate—Template for displaying the ACTIVE profile. Placeholders: {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}
ProfileItemTemplate (3)
FeldTypStandardBeschreibung
itemItem—Base item to display.
loreList<String>emptyLore lines. Placeholders: {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}, {max_profiles}PlatzhalterFarbenMehrzeilig
glowingBooleanfalseWhether the item should glow (enchantment effect).
inactiveProfileTemplateProfileItemTemplate—Template for displaying INACTIVE profiles.
ProfileItemTemplate (3)
FeldTypStandardBeschreibung
itemItem—Base item to display.
loreList<String>emptyLore lines. Placeholders: {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}, {max_profiles}PlatzhalterFarbenMehrzeilig
glowingBooleanfalseWhether the item should glow (enchantment effect).
createProfileTemplateProfileItemTemplate—Template for an EMPTY bar: a slot within the player's limit that holds no profile yet. Clicking it creates one.
ProfileItemTemplate (3)
FeldTypStandardBeschreibung
itemItem—Base item to display.
loreList<String>emptyLore lines. Placeholders: {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}, {max_profiles}PlatzhalterFarbenMehrzeilig
glowingBooleanfalseWhether the item should glow (enchantment effect).
maxProfilesTemplateProfileItemTemplate—Template for a LOCKED bar: a slot beyond the player's profile limit. Inert.
ProfileItemTemplate (3)
FeldTypStandardBeschreibung
itemItem—Base item to display.
loreList<String>emptyLore lines. Placeholders: {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}, {max_profiles}PlatzhalterFarbenMehrzeilig
glowingBooleanfalseWhether the item should glow (enchantment effect).
switchSoundSoundEMPTYSound played when switching profiles.
createSoundSoundEMPTYSound played when creating a profile.
deleteSoundSoundEMPTYSound played when deleting a profile.
errorSoundSoundEMPTYSound played on error (e.g., max profiles reached).
switchMessageString<green>Profil <gold>{profile_name}</gold> activé !Message when switching profiles. Placeholders: {profile_name}, {profile_id}PlatzhalterFarben
createMessageStringCREATE_MESSAGEMessage when creating a profile. Placeholders: {profile_name}, {profile_id}PlatzhalterFarben
deleteMessageString<red>Profil <gold>{profile_name}</gold> supprimé.Message when deleting a profile. Placeholders: {profile_name}, {profile_id}PlatzhalterFarben
maxProfilesMessageStringMAX_PROFILES_MESSAGEMessage when max profiles reached. Placeholders: {max_profiles}PlatzhalterFarben
deleteActiveProfileMessageString<red>Vous ne pouvez pas supprimer votre profil actif !Message when the player tries to delete the profile they are currently using.PlatzhalterFarben
initFailedMessageStringINIT_FAILED_MESSAGEMessage when a profile was created but its island could not be initialized.PlatzhalterFarben
createAnvilTitleStringNom du profilTitle of the profile creation anvil menu.Farben
createAnvilDefaultStringNouveau profilDefault name in the anvil input. Also used when the player validates an empty name.
createNameMaxLengthInt24Maximum length of a profile name typed in the anvil. Longer names are cut.
createTimeoutSecondsIntCREATE_TIMEOUT_SECONDSSeconds after which a profile creation that never finished (anvil closed by something else, no answer) stops blocking the player from creating again. Normally a closed anvil or a disconnect frees the player immediately.
deleteConfirmationBooleantrueRequire confirmation before deleting a profile.
deleteConfirmTitleString<red>Supprimer {profile_name} ?Confirmation menu title. Placeholders: {profile_name}PlatzhalterFarben
deleteConfirmButtonProfileItemTemplate—Confirm button for deletion.
ProfileItemTemplate (3)
FeldTypStandardBeschreibung
itemItem—Base item to display.
loreList<String>emptyLore lines. Placeholders: {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}, {max_profiles}PlatzhalterFarbenMehrzeilig
glowingBooleanfalseWhether the item should glow (enchantment effect).
deleteConfirmSlotInt11Slot of the confirm button in the 3-row confirmation menu (0-26).
deleteCancelButtonProfileItemTemplate—Cancel button for deletion.
ProfileItemTemplate (3)
FeldTypStandardBeschreibung
itemItem—Base item to display.
loreList<String>emptyLore lines. Placeholders: {profile_name}, {profile_id}, {created_date}, {last_used}, {level}, {exp}, {health}, {food}, {max_profiles}PlatzhalterFarbenMehrzeilig
glowingBooleanfalseWhether the item should glow (enchantment effect).
deleteCancelSlotInt15Slot of the cancel button in the 3-row confirmation menu (0-26).
defaultMaxProfilesInt4Default maximum number of profiles allowed per player.
permissionLimitsList<PermissionLimit>emptyPermission based limits that override the default profile amount.
PermissionLimit (2)
FeldTypStandardBeschreibung
permissionString—Permission to check
limitInt1Number of profiles allowed when the permission is present
onSwitchList<Ref<TriggerableEntry>>emptyActions to trigger when a profile is switched.
onCreateList<Ref<TriggerableEntry>>emptyActions to trigger when a profile is created.
onDeleteList<Ref<TriggerableEntry>>emptyActions to trigger when a profile is deleted.

How 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: activeProfileTemplate for the active one, inactiveProfileTemplate for 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.