Package dev.despical.mazeengine.api.operation


package dev.despical.mazeengine.api.operation
Handles, progress samples, and results for accepted world-editing operations.

MazeOperations returns a MazeOperation after accepting creation, regeneration, repair, or deletion. Each handle has a unique UUID independent of the target maze name and retains its terminal state even when that name is later reused. OperationKind identifies the requested action throughout its lifecycle.

Query progress and request cancellation on the server thread. OperationProgress is an immutable sample; its state is the lifecycle contract, while stage text and percentage describe the current internal step. Observe the completion stage without blocking the server thread, and schedule Bukkit work explicitly when a callback may run on another thread.

Successful completion publishes an immutable OperationResult after final persistence or record removal and reservation release. Failure and cancellation complete the stage exceptionally and may leave partially changed blocks. Cancelling a future derived from the completion stage does not stop world work; use the handle's cancellation method to request it.