A class representing an area backup.

Constructors

Properties

id: string

The ID of the area backup.

Accessors

  • get backups(): number[]

    The timestamps of the backups, sorted newest first.

    Returns number[]

  • get backupStructureIds(): string[]

    The structure IDs of the backed up area.

    Returns string[]

  • get dimension(): Dimension

    The dimension of the backed up area.

    Returns Dimension

  • get from(): Vector3

    The corner of the backed up area.

    Returns Vector3

  • get size(): Vector3

    The size of the backed up area.

    Returns Vector3

  • get to(): Vector3

    The opposite corner of the backed up area.

    Returns Vector3

Methods

  • Backs up the area.

    Parameters

    • OptionalsaveTime: number = ...

      The timestamp to save the backup.

    • Optionaloptions: StructureCreateOptions = ...

      The options to use when creating the backup. Defaults to { saveMode: StructureSaveMode.World, includeBlocks: true, includeEntities: false }.

    • OptionalsizeLimits: Vector3 = ...

      The size limits to use when splitting the area. Defaults to { x: 64, y: 128, z: 64 }.

    Returns void

  • Backs up a specific range of the area.

    Parameters

    Returns void

  • Clears all backups from the area backup.

    Returns void

  • Clears a specific backup from the area backup.

    Parameters

    • timestamp: string | number

      The timestamp of the backup to clear.

    Returns void

  • Clears all backups from the area backup.

    Returns void

  • Deletes the area backup.

    Returns void

  • Rolls back to a specific backup.

    Parameters

    • OptionalsaveTime: number = ...

      The timestamp of the backup to roll back to. Defaults to the newest backup.

    • OptionalclearSave: boolean = false

      Whether to clear the backup after rolling back. Defaults to false.

    • Optionaloptions: StructurePlaceOptions

      The options to use when placing the backup.

    • Optionalsizes: Vector3 = ...

      The sizes to use when rolling back. Defaults to { x: 64, y: 128, z: 64 }.

    Returns 0 | 1

    1 if successful, 0 if not.

  • The structure IDs of the backed up area for a specific backup.

    Parameters

    • timestamp: string | number

      The timestamp to get the structure IDs for.

    Returns string[]

    The structure IDs for the given timestamp.

  • The JSON representation of the area backup.

    Returns SavedAreaBackupData

    The JSON representation of the area backup.

  • The JSON representation of the area backup without the ID.

    Returns Omit<SavedAreaBackupData, "id">

    The JSON representation of the area backup without the ID.