import { Player } from"@minecraft/server"; import { uiManager } from"@minecraft/server-ui";
/** * which closes all modal/message/action forms from a player * @paramplayer Player to close the form to */ functioncloseForm(player: Player) { uiManager.closeAllForms(player); }
Remarks
This function can't be called in read-only mode.
Throws
This function can throw errors.
Example: closePlayerForm.ts