A class that represents a WorldEdit selection for a player.

Constructors

Properties

player: Entity

The player that this selection is for.

Accessors

  • get dimension(): undefined | Dimension

    The currently selected dimension.

    It is stored in the player's posD dynamic property.

    Returns undefined | Dimension

  • set dimension(value: undefined | string | Dimension): void

    Parameters

    Returns void

  • get maxPos(): undefined | Vector3

    The largest corner of the selection.

    It gets the maximum values of each of the vectors of the pos1 and pos2 properties.

    Returns undefined | Vector3

  • get minPos(): undefined | Vector3

    The smallest corner of the selection.

    It gets the minimum values of each of the vectors of the pos1 and pos2 properties.

    Returns undefined | Vector3

  • get pos1(): undefined | Vector3

    The first corner of the current selection.

    It is stored in the player's pos1 dynamic property.

    Returns undefined | Vector3

  • set pos1(value: undefined | Vector3): void

    Parameters

    Returns void

  • get pos2(): undefined | Vector3

    The second corner of the current selection.

    It is stored in the player's pos2 dynamic property.

    Returns undefined | Vector3

  • set pos2(value: undefined | Vector3): void

    Parameters

    Returns void

Methods

  • Gets a saved selection from the player's saved selection list.

    Parameters

    • selectionID: string

      The ID of the selection to get.

    Returns undefined | SavedWorldEditSelection

    The saved selection, or undefined if it doesn't exist.

    If the saved selection is not valid JSON.

  • Gets the IDs of all saved selections for this player.

    Returns string[]

    The IDs of all saved selections.

  • Gets all saved selections for this player.

    Returns { [selectionID: string]: SavedWorldEditSelection }

    The saved selections.

    If any of the saved selections are not valid JSON.

  • Removes a saved selection from the player's saved selection list.

    Parameters

    • selectionID: string

      The ID of the selection to remove.

    Returns boolean

    True if the selection was removed, false if it didn't exist.

    If the selectionID is not a string.

  • Saves the current selection to the player's saved selection list.

    Parameters

    Returns void

    If the value is not a valid selection.