History
;undo ;redo ;clearhistoryWorldEdit history stores previous and resulting world states so completed edits can be undone or redone.
It allows you to:
- Undo one or more actions.
- Redo previously undone actions.
- Restore some selections associated with an operation.
- Clear the complete undo and redo chain.
Basic History Workflow
;set stone
;undo
;redo History is a temporary safety system. It is not a permanent world backup.
History Actions
A history action represents one completed WorldEdit operation.
One command can modify one block, thousands of blocks, or several separate regions and still count as a single action.
Examples of commands that normally create history actions:
Recorded World Edits
;set stone
;replace dirt grass_block
;paste
;move 10 east Commands that do not directly modify world blocks normally do not create block-history entries:
Normally Unrecorded Commands
;copy
;gmask stone
;sel cuboid
;pos1
;pos2 What a History Entry Stores
A completed action can store:
- The block state before the operation.
- The block state after the operation.
- One or more affected regions.
- An optional selection before and after the operation.
- The potential block volume used for change-limit checks.
Conceptually:
Stored History States
UNDO = world state before the action
REDO = world state after the action redo restores the saved result. It does not execute the original command again.
Undo Actions
;undo restores one or more earlier history states.
Undo Syntax
;undo [times] Default value:
Undo Default
times = 1 Undo the most recent action:
Undo One Action
;undo Undo five actions:
Undo Multiple Actions
;undo 5 WorldEdit starts with the newest available action.
If fewer actions are available than requested, it processes all available actions and then stops.
Redo Actions
;redo reapplies one or more actions that were previously undone.
Redo Syntax
;redo [times] Default value:
Redo Default
times = 1 Redo one action:
Redo One Action
;redo Redo five actions:
Redo Multiple Actions
;redo 5 Redo actions are restored in chronological order.
Undo and Redo Chain
Consider this action sequence:
Initial History Chain
A → B → C → D After:
Undo Two Actions
;undo 2 The current state is conceptually:
State after Undo
A → B
C and D are available for redo After:
Redo One Action
;redo The state becomes:
State after Redo
A → B → C Creating a New Action after Undo
Creating a new world edit after undo removes the previous redo branch.
Original chain:
Original Branch
A → B → C Undo two actions:
Move Back in History
;undo 2 Create a new action D:
Create a New Branch
A → D The old B → C redo branch is permanently removed from the current history.
Clear History
;clearhistory deletes the complete undo and redo chain for the current player.
Clear History
;clearhistory It removes:
- Actions available for undo.
- Actions available for redo.
- Temporary history buffers.
It does not modify:
- Current world blocks.
- The current selection.
- The clipboard.
- Gradients.
- Masks.
- Brushes or tools.
Clearing history cannot be undone.
History Size
The default configuration stores up to:
Default History Size
maxHistorySize = 25 The limit counts actions, not individual blocks.
When a new action exceeds the configured history size, the oldest stored action is removed.
A larger history can consume significantly more memory because one action can store both the previous and resulting states of multiple regions.
Player Sessions
History belongs to the individual player’s WorldEdit session.
Per-Player History
Player A → History A
Player B → History B The current commands operate on the history of the player executing them. They do not accept another player’s name as a history target.
The default disconnected-session retention is approximately:
Default Session Retention
ticksToDeleteSession = 12000 ticks
12000 ticks ≈ 10 minutes History can remain available after reconnecting while:
- The world or server remains active.
- The session has not expired.
- The configured retention time has not elapsed.
History is lost when the world or server closes and the sessions are removed.
Multi-Region Actions
A single history action can contain more than one affected region.
For example, moving a structure can track both:
Move History Regions
original region
destination region Undoing that one action attempts to restore both areas together.
Multiple copies created by an operation such as stack can also be stored as one completed action.
Selection History
History is not a general undo system for every selection command.
Commands such as these should not be expected to create normal history actions:
Normally Untracked Selection Changes
;pos1
;pos2
;expand
;contract
;shift Some world-editing operations explicitly track their previous and resulting selections.
Examples include operations using selection-update flags:
Selection-Tracking Operations
;paste -s
;paste -n
;move -s
;stack -s
;rotate -ws 90
;flip -ws east
;scale -ws 2 Undoing these actions can restore both the world and the previous selection.
A preview created with ;paste -n can create a selection-history action even though it does not place blocks.
History and Clipboard State
History and clipboard are separate systems.
;copychanges the clipboard but not the world.;cutchanges the world and can be undone.;pastechanges the world and can be undone.- Clipboard-only
;rotate,;flip, and;scaledo not create world-history actions. - Transformations using
-wmodify the world and can enter history.
Undo restores recorded world regions. It does not restore an older clipboard or previous clipboard transformations.
Redo with Random Results
Redo restores the exact stored result of the original action.
Random Pattern History
;set 50%stone,50%andesite
;undo
;redo The redo operation restores the same saved random distribution. It does not generate a new random pattern.
Running the original ;set command again can produce a different distribution.
Entities
Current regional history buffers focus on blocks and do not include entities by default.
Therefore, operations involving entities may not be completely restored by undo.
Possible limitations include:
- Removed entities may not return.
- Duplicated entities may remain.
- Entity position or data may not be reconstructed.
- Players are not included as clipboard entities.
Create an independent backup before editing areas containing important entities.
Indirect Minecraft Effects
History records direct changes made by WorldEdit. It does not automatically track every later consequence produced by Minecraft.
Examples include:
- Flowing water or lava.
- Spreading fire.
- Explosions.
- Redstone or block updates.
- Changes caused by another add-on.
For example, undoing a water placement can restore the directly edited region while water that flowed outside that region may remain.
Dimensions
For safety, run undo and redo in the same dimension where the original edit was performed.
The current implementation can load stored buffers using the player’s current dimension.
Safe Dimension Workflow
perform edit in Overworld
return to Overworld
;undo Before undoing:
- Return to the original dimension.
- Move near the affected region.
- Allow the required chunks to load.
- Run
;undoor;redo.
Large and Active Operations
Large operations can run through WorldEdit’s job system and history may still be recording while the edit is in progress.
During this time, history commands can report that history is still being recorded.
Wait for the current job to finish before using:
History Commands
;undo
;redo
;clearhistory Canceling a running operation does not guarantee a complete rollback. A canceled job can leave partial changes without a confirmed history action.
Common Problems
Nothing to Undo
Possible causes:
- No recorded world-editing action was completed.
- History was cleared.
- The action exceeded the stored history window and was removed.
- The player session expired.
- The world or server was closed.
- The operation failed before history was confirmed.
- Another player performed the action.
Nothing to Redo
Possible causes:
- No action has been undone.
- Every undone action has already been redone.
- A new action was created after undo.
- History was cleared.
- The session expired.
The World Was Not Fully Restored
Possible causes:
- Fluids, fire, explosions, or later game updates.
- Entities.
- Changes from another add-on.
- Areas outside the recorded buffers.
- A canceled operation.
- Undo or redo executed in another dimension.
Confusing Actions with Blocks
The number in ;undo 5 means five history actions, not five blocks.
Expecting Clipboard Recovery
Undo does not restore earlier clipboard contents.
Expecting Redo to Re-run a Command
Redo restores the saved resulting state instead of executing the command again.
Recommended Practices
- Test large edits on a small selection first.
- Stay in the original dimension until the result is confirmed.
- Wait for large jobs to finish before using history commands.
- Avoid relying on undo for fluids, fire, explosions, or entities.
- Do not clear history until you are certain it is no longer needed.
- Increase
maxHistorySizecarefully. - Keep a separate world backup for important builds.
Quick Reference
History Commands
;undo [times]
;redo [times]
;clearhistory History Defaults
maxHistorySize = 25 actions
ticksToDeleteSession = 12000 ticks
session retention ≈ 10 minutes Redo Branch Rule
undo → new action → previous redo branch removed History Coverage Rule
direct WorldEdit changes = normally recorded
later Minecraft effects = not guaranteed