switch_profile_action
Switches the player to a specific profile — action entry.
Entry Information
| Property | Value |
|---|---|
| Entry ID | switch_profile_action |
| Type | Action |
| Color | Red |
| Icon | mdi:account-switch |
Description
Action to open the profile selection menu. / @Entry( "open_profile_menu_action", "Opens the profile selection menu for the player", Colors.RED, "mdi:account-multiple" ) @Tags("profiles", "action", "menu") class OpenProfileMenuActionEntry( override val id: String = "", override val name: String = "", override val triggers: List<Ref<TriggerableEntry>> = emptyList(), override val criteria: List<Criteria> = emptyList(), override val modifiers: List<Modifier> = emptyList(), @Help("Reference to the menu configuration. If empty, uses the first available.") val menuConfig: Ref<ProfileMenuConfigEntry> = emptyRef(), ) : ActionEntry { override fun ActionTrigger.execute() { val configId = menuConfig.get()?.id val menuService = org.koin.core.context.GlobalContext.get().get<ProfileMenuService>() menuService.open(player, configId) } } /** Action to switch to a specific profile by ID.
Fields
| Field | Type | Description |
|---|---|---|
profileId | String | The profile ID to switch to. Supports placeholders. |
successMessage | String | Message to send on success. Leave empty for no message. |
failureMessage | String | Message to send on failure. Leave empty for no message. |
Usage Example
- entry: switch_profile_action
name: "Switches the player to a specific profile"
profileId: ""
successMessage: ""
failureMessage: ""