Skip to main content

switch_profile_action

Switches the player to a specific profile — action entry.

Entry Information

PropertyValue
Entry IDswitch_profile_action
TypeAction
ColorRed
Iconmdi: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

FieldTypeDescription
profileIdStringThe profile ID to switch to. Supports placeholders.
successMessageStringMessage to send on success. Leave empty for no message.
failureMessageStringMessage 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: ""