Class UpdateChecker
java.lang.Object
io.github.toberocat.guiengine.utils.UpdateChecker
A utility class for checking updates for a Bukkit/Spigot plugin.
It retrieves the latest version information from the SpigotMC API asynchronously.
-
Constructor Summary
ConstructorsConstructorDescriptionUpdateChecker(org.bukkit.plugin.java.JavaPlugin plugin, int resourceId) Create a new instance of the UpdateChecker. -
Method Summary
Modifier and TypeMethodDescriptionvoidgetVersion(@NotNull Consumer<String> consumer) Get the latest version information from the SpigotMC API.
-
Constructor Details
-
UpdateChecker
public UpdateChecker(org.bukkit.plugin.java.JavaPlugin plugin, int resourceId) Create a new instance of the UpdateChecker.- Parameters:
plugin- The JavaPlugin instance of the plugin.resourceId- The resource ID of the plugin on SpigotMC.
-
-
Method Details
-
getVersion
Get the latest version information from the SpigotMC API.- Parameters:
consumer- A consumer that will receive the latest version information as a String.
-