Package ch.njol.skript.update
Class Updater
java.lang.Object
ch.njol.skript.update.Updater
- Direct Known Subclasses:
SkriptUpdater
Extensible updater system. Note: starts disabled, must be enabled using
setEnabled(boolean)
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionChecks for updates asynchronously, without blocking the caller.Fetches the update manifest.getState()
@Nullable UpdateManifest
boolean
void
setCheckFrequency(long ticks)
Sets update check frequency.void
setEnabled(boolean enabled)
void
setReleaseChannel(ReleaseChannel channel)
-
Constructor Details
-
Updater
-
-
Method Details
-
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
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
-
setReleaseChannel
-
setCheckFrequency
public void setCheckFrequency(long ticks)Sets update check frequency.- Parameters:
ticks
- Frequency in ticks.
-
getState
-
getReleaseStatus
-
getUpdateManifest
-
setEnabled
public void setEnabled(boolean enabled) -
isEnabled
public boolean isEnabled()
-