Edit

Share via


SelectionManager Class

The SelectionManager (accessible from the @minecraft/server-editor.ExtensionContext) is responsible for the management of all {@link @minecraft/server-editor.Selection} objects, and provides the user the ability to create new {@link @minecraft/server-editor.Selection} objects for use within an extension.

Properties

entity

read-only entity: SelectionContainerEntity;

Type: SelectionContainerEntity

volume

read-only volume: SelectionContainerVolume;

Type: SelectionContainerVolume

Methods

deselectBlocks

deselectBlocks(blockIdentifier: string): Promise<number>

Parameters

  • blockIdentifier: string

Returns Promise<number>

Notes:

  • This function can't be called in restricted-execution mode.

generateManifest

generateManifest(): Promise<SelectionManifestData>

Returns Promise<SelectionManifestData>

Notes:

  • This function can't be called in restricted-execution mode.

getCurrentManifest

getCurrentManifest(): SelectionManifestData | undefined

Returns SelectionManifestData | undefined

Notes:

  • This function can't be called in restricted-execution mode.

replaceBlocks

replaceBlocks(fromBlockIdentifier: string, toBlockIdentifier: string): Promise<number>

Parameters

  • fromBlockIdentifier: string
  • toBlockIdentifier: string

Returns Promise<number>

Notes:

  • This function can't be called in restricted-execution mode.