Class UpdateChecker

java.lang.Object
io.github.toberocat.guiengine.utils.UpdateChecker

public class UpdateChecker extends Object
A utility class for checking updates for a Bukkit/Spigot plugin. It retrieves the latest version information from the SpigotMC API asynchronously.
  • 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

      public void getVersion(@NotNull @NotNull Consumer<String> consumer)
      Get the latest version information from the SpigotMC API.
      Parameters:
      consumer - A consumer that will receive the latest version information as a String.