Class UpdateChecker

java.lang.Object
dev.demeng.pluginbase.UpdateChecker

public class UpdateChecker extends Object
Simple utility for checking for resource updates on SpigotMC.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    The result of an update check.
  • Constructor Summary

    Constructors
    Constructor
    Description
    UpdateChecker(int resourceId)
    Creates a new update checker instance and caches the latest version from Spigot.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    notifyResult(@Nullable org.bukkit.command.CommandSender sender)
    Notifies the console or a player about a new update.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 than UpdateChecker.Result.OUTDATED will do nothing.
      Parameters:
      sender - The console or player to notify, defaults to console if null