Interface DownloadManager
- All Superinterfaces:
Manager
- All Known Implementing Classes:
DisabledDownloader, Downloader
DownloadManager
This interface represents a manager, that controls web server for downloading players worlds with /world download.-
Method Summary
Modifier and TypeMethodDescriptionvoidClears all archives from temporary folder.voidclearArchives(@NotNull Planet planet) Removes saved archives of planet, because it was unloaded.@NotNull FilecompressPlanetToArchive(@NotNull Planet planet, @NotNull DownloadSession session) Compresses planet folders to one archive.voidshutdown()Shutdowns web world downloader server.@NotNull CompletableFuture<String> uploadPlanet(@NotNull Planet planet, @NotNull org.bukkit.entity.Player player) Compresses planet folders to archive in temporary folder, then generates unique token and returns link to download world.
-
Method Details
-
uploadPlanet
@NotNull @NotNull CompletableFuture<String> uploadPlanet(@NotNull @NotNull Planet planet, @NotNull @NotNull org.bukkit.entity.Player player) Compresses planet folders to archive in temporary folder, then generates unique token and returns link to download world.- Parameters:
planet- planet, that was requested to download.player- player, who requested.- Returns:
- string of link.
-
compressPlanetToArchive
@NotNull @NotNull File compressPlanetToArchive(@NotNull @NotNull Planet planet, @NotNull @NotNull DownloadSession session) Compresses planet folders to one archive.- Parameters:
planet- planet to compress folders.session- download session.- Returns:
- compressed archive.
-
clearArchives
Removes saved archives of planet, because it was unloaded.- Parameters:
planet- planet to remove archive.
-
clearAllArchives
void clearAllArchives()Clears all archives from temporary folder. -
shutdown
void shutdown()Shutdowns web world downloader server.
-