Class ChunkCoordinator

java.lang.Object
com.plotsquared.core.queue.ChunkCoordinator
All Implemented Interfaces:
Runnable

public abstract class ChunkCoordinator extends Object implements Runnable
  • Constructor Details

  • Method Details

    • start

      public abstract void start()
      Starts the chunk coordinator. This will usually (implementation-specific-permitting) mark chunks to be loaded in batches, then add them to a queue and apply tickets once loaded to prevent unloading. A repeating task will then iterate over loaded chunks, access them with a Consumer(BlockVector2) and remove the ticket once work has been completed on it.
    • cancel

      public abstract void cancel()
      Cancel the chunk coordinator.
      Since:
      6.0.10
    • getRemainingChunks

      public abstract int getRemainingChunks()
      Get the amount of remaining chunks (at the time of the method call)
      Returns:
      Snapshot view of remaining chunk count
    • getTotalChunks

      public abstract int getTotalChunks()
      Get the amount of requested chunks
      Returns:
      Requested chunk count