Klasse SchematicService

java.lang.Object
de.delinkedde.areashopreborn.application.SchematicService
Alle implementierten Schnittstellen:
AutoCloseable

public final class SchematicService extends Object implements AutoCloseable
Coordinates bounded region backups and restores across SQLite, WorldEdit, and file storage.

World capture and paste run through the server-thread bridge. Compression and parsing use a dedicated background executor, preventing schematic file I/O from blocking Paper or the SQLite queue.

  • Konstruktordetails

    • SchematicService

      public SchematicService(org.bukkit.plugin.java.JavaPlugin plugin, Database database, EstateRepository estates, SchematicGateway schematics, ThreadBridge threads, long maximumVolume, boolean enabled)
      Creates the schematic service and its private file executor.
      Parameter:
      plugin - owning plugin
      database - asynchronous database executor
      estates - estate repository
      schematics - WorldEdit adapter
      threads - server-thread bridge
      maximumVolume - largest region accepted for capture or paste
      enabled - feature switch
    • SchematicService

      public SchematicService(org.bukkit.plugin.java.JavaPlugin plugin, Database database, EstateRepository estates, SchematicGateway schematics, ThreadBridge threads, long maximumVolume, long maximumFileBytes, int maximumQueuedOperations, boolean enabled)
      Creates a bounded schematic service and its private file executor.
      Parameter:
      plugin - owning plugin
      database - asynchronous database executor
      estates - estate repository
      schematics - WorldEdit adapter
      threads - server-thread bridge
      maximumVolume - largest region accepted for capture or paste
      maximumFileBytes - largest compressed schematic accepted or retained
      maximumQueuedOperations - number of waiting file operations
      enabled - feature switch
  • Methodendetails

    • save

      public CompletableFuture<Path> save(UUID actorId, String regionName)
      Captures a managed region and writes its canonical backup file.
      Parameter:
      actorId - administrator creating the backup
      regionName - region display name or protection identifier
      Gibt zurück:
      future containing the written schematic path
    • apply

      public CompletableFuture<Void> apply(UUID actorId, String regionName)
      Reads and pastes a region's canonical backup file after validating bounds and volume.
      Parameter:
      actorId - administrator applying the backup
      regionName - region display name or protection identifier
      Gibt zurück:
      completion future
    • close

      public void close()
      Stops the private file executor and interrupts work that exceeds the shutdown grace period.
      Angegeben von:
      close in Schnittstelle AutoCloseable