Skip to content

@minecraft/server-ui


@minecraft/server-ui / MessageBoxResult

Interface: MessageBoxResult

Defined in: @minecraft/server-ui/index.d.ts:1609

The result returned when an MessageBox is closed. Contains the reason the message box was closed and the player's button selection, if applicable.

Properties

closeReason

closeReason: DataDrivenScreenClosedReason

Defined in: @minecraft/server-ui/index.d.ts:1615

Remarks

The reason the message box was closed.


selection?

optional selection?: number

Defined in: @minecraft/server-ui/index.d.ts:1623

Remarks

The index of the button the player selected. Not set if the message box was closed without a button selection (e.g., the player was busy or the server closed it).