Package dev.demeng.pluginbase
Class UpdateChecker
java.lang.Object
dev.demeng.pluginbase.UpdateChecker
Simple utility for checking for resource updates on SpigotMC.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionUpdateChecker(int resourceId) Creates a new update checker instance and caches the latest version from Spigot. -
Method Summary
Modifier and TypeMethodDescriptionvoidnotifyResult(@Nullable org.bukkit.command.CommandSender sender) Notifies the console or a player about a new update.
-
Constructor Details
-
UpdateChecker
public UpdateChecker(int resourceId) Creates a new update checker instance and caches the latest version from Spigot. Should be called asynchronously.- Parameters:
resourceId- The resource ID on SpigotMC
-
-
Method Details
-
notifyResult
public void notifyResult(@Nullable @Nullable org.bukkit.command.CommandSender sender) Notifies the console or a player about a new update. Calling this method if the#getResult()is anything other thanUpdateChecker.Result.OUTDATEDwill do nothing.- Parameters:
sender- The console or player to notify, defaults to console if null
-