Klasse SchematicService
java.lang.Object
de.delinkedde.areashopreborn.application.SchematicService
- Alle implementierten Schnittstellen:
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.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungSchematicService(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.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. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReads and pastes a region's canonical backup file after validating bounds and volume.voidclose()Stops the private file executor and interrupts work that exceeds the shutdown grace period.Captures a managed region and writes its canonical backup file.
-
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 plugindatabase- asynchronous database executorestates- estate repositoryschematics- WorldEdit adapterthreads- server-thread bridgemaximumVolume- largest region accepted for capture or pasteenabled- 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 plugindatabase- asynchronous database executorestates- estate repositoryschematics- WorldEdit adapterthreads- server-thread bridgemaximumVolume- largest region accepted for capture or pastemaximumFileBytes- largest compressed schematic accepted or retainedmaximumQueuedOperations- number of waiting file operationsenabled- feature switch
-
-
Methodendetails
-
save
Captures a managed region and writes its canonical backup file.- Parameter:
actorId- administrator creating the backupregionName- region display name or protection identifier- Gibt zurück:
- future containing the written schematic path
-
apply
Reads and pastes a region's canonical backup file after validating bounds and volume.- Parameter:
actorId- administrator applying the backupregionName- 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:
closein SchnittstelleAutoCloseable
-