Class: ActionFormData
Beta
构建一个带有按钮的简单玩家表单,让玩家可以执行操作。
Builds a simple player form with buttons that let the player take action.
Examples
Constructors
Constructor
new ActionFormData():
ActionFormData
Beta
Returns
ActionFormData
Methods
body()
body(
bodyText):ActionFormData
Beta
Parameters
bodyText
any
Returns
ActionFormData
Remarks
设置模态表单主体文本的方法。
Method that sets the body text for the modal form.
button()
button(
text,iconPath?):ActionFormData
Beta
Parameters
text
any
iconPath?
string
Returns
ActionFormData
Remarks
向此表单添加一个带有资源包图标的按钮。
Adds a button to this form with an icon from a resource pack.
divider()
divider():
ActionFormData
Beta
Returns
ActionFormData
Remarks
向表单添加一个区域分隔线。
Adds a section divider to the form.
header()
header(
text):ActionFormData
Beta
Parameters
text
any
要显示的文本。
Text to display.
Returns
ActionFormData
Remarks
向表单添加一个标题。
Adds a header to the form.
label()
label(
text):ActionFormData
Beta
Parameters
text
any
要显示的文本。
Text to display.
Returns
ActionFormData
Remarks
向表单添加一个标签。
Adds a label to the form.
show()
show(
player):Promise<ActionFormResponse>
World Mutation Beta
Parameters
player
Player
要向其显示此对话框的玩家。
Player to show this dialog to.
Returns
Promise<ActionFormResponse>
Remarks
创建并显示此模态弹出表单。当玩家确认或取消对话框时异步返回。
Creates and shows this modal popup form. Returns asynchronously when the player confirms or cancels the dialog.
Throws
This function can throw errors.
title()
title(
titleText):ActionFormData
Beta
Parameters
titleText
any
Returns
ActionFormData
Remarks
此构建器方法设置模态对话框的标题。
This builder method sets the title for the modal dialog.
