A ClipboardItem is a handle to an object which represents a set of blocks in a contained bounding area (most likely copied from the world)

Properties

id: string
isEmpty: boolean

Return whether there is any block content in the item

This property can throw when used.

Methods

  • Returns void

    Clear the contents of the item

    This function can't be called in read-only mode.

    This function can throw errors.

  • Parameters

    • location: Vector3

      A world location to which the ClipboardItem may potentially be written (nothing is actually written as part of this operation)

    • Optionaloptions: ClipboardWriteOptions

      An optional set of write parameters which govern how the ClipboardItem should be potentially applied to the world

    Returns CompoundBlockVolume

    A minecraftserver.CompoundBlockVolume which represents the occupied block volumes within the ClipboardItem as they would be written to the world with the specified ClipboardWriteOptions

    Create a minecraftserver.CompoundBlockVolume container which represents the occupied block volumes within the ClipboardItem. This function does not perform any write operations, and instead returns only a prediction of the volume area which would be affected as part of a write operation with a given set of write options.

    This function can't be called in read-only mode.

    This function can throw errors.

  • Parameters

    • location: Vector3

      A world location to which the ClipboardItem may potentially be written (nothing is actually written as part of this operation)

    • Optionaloptions: ClipboardWriteOptions

      An optional set of write parameters which govern how the ClipboardItem should be potentially applied to the world

    Returns Selection

    A Selection which represents the occupied block volumes within the ClipboardItem as they would be written to the world with the specified ClipboardWriteOptions

    Create a Selection container which represents the occupied block volumes within the ClipboardItem. This function does not perform any write operations, and instead returns only a prediction of the volume area which would be affected as part of a write operation with a given set of write options.

    This function can't be called in read-only mode.

    This function can throw errors.

  • Returns Vector3

    Get the bounding size of the ClipboardItem

    This function can't be called in read-only mode.

    This function can throw errors.

  • Parameters

    • selection: Selection

      A volume which represents the area to be copied

    Returns void

    Copy the contents of the area represented by a Selection volume into the ClipboardItem

    This function can't be called in read-only mode.

    This function can throw errors.

  • Parameters

    Returns void

    This function can't be called in read-only mode.

    This function can throw errors.

    Error

  • Parameters

    • from: Vector3

      The world location of one corner of a bounding volume

    • to: Vector3

      The world location of the opposite corner of a bounding volume

    Returns void

    Copy the contents of a rectangular volume into the Clipboard Item

    This function can't be called in read-only mode.

    This function can throw errors.

  • Parameters

    • location: Vector3

      The root point of the world location to which the ClipboardItem is written (this is modified by the various anchor, offset and rotation parameters of the ClipboardWriteOptions

    • Optionaloptions: ClipboardWriteOptions

      An optional set of write parameters which modify the properties of the ClipboardItem as it is applied to the world

    Returns boolean

    Success or Failure

    Apply the contents of a ClipboardItem to the world at a given location using a set of write options

    This function can't be called in read-only mode.

    This function can throw errors.