Custom
Custom Menu: A single complex screen with a title, description and components.
menu:
test_custom:
type: CUSTOM
server: Lobby
title: "Custom Form Example"
description: "Please provide the following information"
components:
name_input:
type: input
text: "Enter your name"
placeholder: "Your name here"
default: "DefaultName"
action: "command say Hello $1" # Action for just this input
age_slider:
type: slider
text: "Select your age"
min: 1
max: 100
step: 1
default: 18
action: "command say You are $1 years old" # Action for just this slider
preferences_dropdown:
type: dropdown
text: "Select a preference"
options:
- "Option 1"
- "Option 2"
- "Option 3"
default: 0
action: "command say You selected $1" # Action for just this dropdown
enable_feature_toggle:
type: toggle
text: "Enable feature"
default: false
action: "command say Feature enabled: $1" # Action for just this toggle
global_actions:
- "command say Player $name_input, age $age_slider, selected $preferences_dropdown, feature enabled: $enable_feature_toggle"
How it works (high-level):
type: CUSTOM
– Declares you have a multi-component form. Each component can be an input, slider, dropdown, or toggle.Components are added under
components:
. Each component has:A unique key (like
name_input
,age_slider
).A type (input, slider, dropdown, toggle).
Properties (e.g.,
text
,placeholder
,default
, etc.).An optional
action
(like"command say Hello $1"
) that runs after the user completes the form, using that component’s value - see Actions.
Global actions listed under
global_actions:
are executed after the form is submitted, and can reference each component by"$componentKey"
. For example,"$name_input"
is replaced with the user’s typed name.Description
is what will be shown before the buttonsPermission
custom permission for this menu to be opened(Proxy Only)
server
define the server you want this menu to work on
Last updated