Interface Updater

All Superinterfaces:
Manager, Startable
All Known Implementing Classes:
HangarUpdater

public interface Updater extends Manager, Startable

Updater

This interface represents a update manager, that tells server to update or not.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns updates availability for OpenCreative+.
    Sends web request and checks if new updates of OpenCreative+ are available.

    Methods inherited from interface Manager

    getName
    Modifier and Type
    Method
    Description
    @NotNull String
    Returns name of manager, that will be displayed by request in the logs.

    Methods inherited from interface Startable

    start
    Modifier and Type
    Method
    Description
    void
    Does tasks on start.
  • Method Details

    • checkUpdates

      @NotNull @NotNull CompletableFuture<String> checkUpdates()
      Sends web request and checks if new updates of OpenCreative+ are available. It's called once on plugin enable and on command usage.
    • canBeUpdated

      boolean canBeUpdated()
      Returns updates availability for OpenCreative+. It gets saved value from checkUpdates().
      Returns:
      true - if updates are available, false - if not.