ModalFormData
¶
文档版本:1.21.60.21
ModalFormData
类。script_api.minecraft/server-ui.modalformdata.description
方法¶
constructor
script_api.minecraft/server-ui.modalformdata.constructor.description
dropdown
script_api.minecraft/server-ui.modalformdata.dropdown.description
dropdown(label: RawMessage | string, options: (RawMessage | string)[], defaultValueIndex?: int32): ModalFormData
label
:RawMessage
|string
- script_api.minecraft/server-ui.modalformdata.dropdown.label.description
options
:(RawMessage | string)[]
- script_api.minecraft/server-ui.modalformdata.dropdown.options.description
defaultValueIndex
?:int32
=null
- script_api.minecraft/server-ui.modalformdata.dropdown.defaultvalueindex.description
- 返回值:
ModalFormData
- script_api.minecraft/server-ui.modalformdata.dropdown.return
show
script_api.minecraft/server-ui.modalformdata.show.description
player
:Player
- script_api.minecraft/server-ui.modalformdata.show.player.description
- 返回值:
Promise<ModalFormResponse>
- script_api.minecraft/server-ui.modalformdata.show.return
slider
script_api.minecraft/server-ui.modalformdata.slider.description
slider(label: RawMessage | string, minimumValue: float, maximumValue: float, valueStep: float, defaultValue?: float): ModalFormData
label
:RawMessage
|string
- script_api.minecraft/server-ui.modalformdata.slider.label.description
minimumValue
:float
- script_api.minecraft/server-ui.modalformdata.slider.minimumvalue.description
maximumValue
:float
- script_api.minecraft/server-ui.modalformdata.slider.maximumvalue.description
valueStep
:float
- script_api.minecraft/server-ui.modalformdata.slider.valuestep.description
defaultValue
?:float
=null
- script_api.minecraft/server-ui.modalformdata.slider.defaultvalue.description
- 返回值:
ModalFormData
- script_api.minecraft/server-ui.modalformdata.slider.return
submitButton
script_api.minecraft/server-ui.modalformdata.submitbutton.description
submitButtonText
:RawMessage
|string
- script_api.minecraft/server-ui.modalformdata.submitbutton.submitbuttontext.description
textField
script_api.minecraft/server-ui.modalformdata.textfield.description
textField(label: RawMessage | string, placeholderText: RawMessage | string, defaultValue?: RawMessage | string): ModalFormData
label
:RawMessage
|string
- script_api.minecraft/server-ui.modalformdata.textfield.label.description
placeholderText
:RawMessage
|string
- script_api.minecraft/server-ui.modalformdata.textfield.placeholdertext.description
defaultValue
?:RawMessage
|string
=null
- script_api.minecraft/server-ui.modalformdata.textfield.defaultvalue.description
- 返回值:
ModalFormData
- script_api.minecraft/server-ui.modalformdata.textfield.return
title
script_api.minecraft/server-ui.modalformdata.title.description
titleText
:RawMessage
|string
- script_api.minecraft/server-ui.modalformdata.title.titletext.description
- 返回值:
ModalFormData
- script_api.minecraft/server-ui.modalformdata.title.return
toggle
script_api.minecraft/server-ui.modalformdata.toggle.description
label
:RawMessage
|string
- script_api.minecraft/server-ui.modalformdata.toggle.label.description
defaultValue
?:boolean
=null
- script_api.minecraft/server-ui.modalformdata.toggle.defaultvalue.description
- 返回值:
ModalFormData
- script_api.minecraft/server-ui.modalformdata.toggle.return