Class Updater

java.lang.Object
ch.njol.skript.update.Updater
Direct Known Subclasses:
SkriptUpdater

public abstract class Updater extends Object
Extensible updater system. Note: starts disabled, must be enabled using setEnabled(boolean).
  • Constructor Details

  • Method Details

    • fetchUpdateManifest

      public CompletableFuture<UpdateManifest> fetchUpdateManifest()
      Fetches the update manifest. Release channel must have been set before this is done. Note that this will not have side effects to this Updater instance.
      Returns:
      Future that will contain update manifest or null if no updates are available in current channel.
    • checkUpdates

      public CompletableFuture<Void> checkUpdates()
      Checks for updates asynchronously, without blocking the caller. This updater instance will be mutated with new data.
      Returns:
      A future which is completed when check has been done.
    • getCurrentRelease

      public ReleaseManifest getCurrentRelease()
    • setReleaseChannel

      public void setReleaseChannel(ReleaseChannel channel)
    • setCheckFrequency

      public void setCheckFrequency(long ticks)
      Sets update check frequency.
      Parameters:
      ticks - Frequency in ticks.
    • getState

      public UpdaterState getState()
    • getReleaseStatus

      public ReleaseStatus getReleaseStatus()
    • getUpdateManifest

      public @Nullable UpdateManifest getUpdateManifest()
    • setEnabled

      public void setEnabled(boolean enabled)
    • isEnabled

      public boolean isEnabled()