Class DisabledDownloader

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

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
    • init

      public void init()
      Description copied from interface: Manager
      Initialization of manager.
      Specified by:
      init in interface Manager
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: Manager
      Checks if manager is ready to work.
      Specified by:
      isEnabled in interface Manager
      Returns:
      true - if enabled, false - disabled.
    • shutdown

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

      public 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.