Class DisabledDownloader

java.lang.Object
ua.mcchickenstudio.opencreative.managers.downloader.DisabledDownloader
All Implemented Interfaces:
DownloadManager, Manager, ShutDownable, Startable, Toggleable

public final class DisabledDownloader extends Object implements DownloadManager
  • Constructor Details

    • DisabledDownloader

      public DisabledDownloader()
  • Method Details

    • uploadPlanet

      @NotNull public @NotNull CompletableFuture<String> uploadPlanet(@NotNull @NotNull Planet planet, @NotNull @NotNull org.bukkit.entity.Player player)
      Description copied from interface: DownloadManager
      Compresses planet folders to archive in temporary folder, then generates unique token and returns link to download world.
      Specified by:
      uploadPlanet in interface DownloadManager
      Parameters:
      planet - planet, that was requested to download.
      player - player, who requested.
      Returns:
      string of link.
    • compressPlanetToArchive

      @NotNull public @NotNull File compressPlanetToArchive(@NotNull @NotNull Planet planet, @NotNull @NotNull DownloadSession session)
      Description copied from interface: DownloadManager
      Compresses planet folders to one archive.
      Specified by:
      compressPlanetToArchive in interface DownloadManager
      Parameters:
      planet - planet to compress folders.
      session - download session.
      Returns:
      compressed archive.
    • clearArchives

      public void clearArchives(@NotNull @NotNull Planet planet)
      Description copied from interface: DownloadManager
      Removes saved archives of planet, because it was unloaded.
      Specified by:
      clearArchives in interface DownloadManager
      Parameters:
      planet - planet to remove archive.
    • clearAllArchives

      public void clearAllArchives()
      Description copied from interface: DownloadManager
      Clears all archives from temporary folder.
      Specified by:
      clearAllArchives in interface DownloadManager
    • start

      public void start()
      Description copied from interface: Startable
      Does tasks on start.
      Specified by:
      start in interface Startable
    • isWorking

      public boolean isWorking()
      Description copied from interface: Toggleable
      Checks whether manager was started successfully and it currently works.
      Specified by:
      isWorking in interface Toggleable
      Returns:
      true - started up, false - shut downed.
    • shutdown

      public void shutdown()
      Description copied from interface: DownloadManager
      Shutdowns web world downloader server.
      Specified by:
      shutdown in interface DownloadManager
      Specified by:
      shutdown in interface ShutDownable
    • getName

      @NotNull public @NotNull String getName()
      Description copied from interface: Manager
      Returns name of manager, that will be displayed by request in the logs.
      Specified by:
      getName in interface Manager
      Returns:
      name of manager.