Class PaperCleanupExecutor
java.lang.Object
com.cotani.cleanup.paper.PaperCleanupExecutor
- All Implemented Interfaces:
CleanupExecutor
Paper/Folia adapter that scans loaded chunks and removes entities on their owning entity threads.
-
Constructor Summary
ConstructorsConstructorDescriptionPaperCleanupExecutor(com.cotani.task.api.PaperTaskScheduler scheduler) PaperCleanupExecutor(com.cotani.task.api.PaperTaskScheduler scheduler, CleanupProtection protection) -
Method Summary
Modifier and TypeMethodDescriptionremoveAsync(CleanupPolicy policy, List<CleanupEntitySnapshot> candidates) Revalidates and removes the supplied snapshots on their owning entity or region threads.scanAsync(CleanupPolicy policy) Scans loaded areas and returns immutable snapshots; it must not remove anything.
-
Constructor Details
-
PaperCleanupExecutor
public PaperCleanupExecutor(com.cotani.task.api.PaperTaskScheduler scheduler) -
PaperCleanupExecutor
public PaperCleanupExecutor(com.cotani.task.api.PaperTaskScheduler scheduler, CleanupProtection protection)
-
-
Method Details
-
scanAsync
Description copied from interface:CleanupExecutorScans loaded areas and returns immutable snapshots; it must not remove anything. Implementations must perform Bukkit/Paper access on the owning server thread.- Specified by:
scanAsyncin interfaceCleanupExecutor
-
removeAsync
public CompletionStage<CleanupRemovalResult> removeAsync(CleanupPolicy policy, List<CleanupEntitySnapshot> candidates) Description copied from interface:CleanupExecutorRevalidates and removes the supplied snapshots on their owning entity or region threads. A missing or changed entity should be reported as skipped instead of failing the whole run.- Specified by:
removeAsyncin interfaceCleanupExecutor
-