Class UpdateCheckEvent

java.lang.Object
org.bukkit.event.Event
com.jeff_media.updatechecker.UpdateCheckEvent

public class UpdateCheckEvent extends org.bukkit.event.Event
This event is called whenever an update check is finished.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    Returns the latest version string found by the UpdateChecker, or null if all previous checks have failed.
    org.bukkit.command.CommandSender[]
    Gets an array of all CommandSenders who have requested this update check.
    Gets the result, i.e. whether a new version is available or not.
    Checks whether the update checking attempt was successful or failed.
    Gets the version string of the currently used plugin version.
    setRequesters(org.bukkit.command.CommandSender... requesters)
    Sets the CommandSenders who requested this update check.

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
    • getHandlers

      @NotNull public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getLatestVersion

      @Nullable public String getLatestVersion()
      Returns the latest version string found by the UpdateChecker, or null if all previous checks have failed.
      Returns:
      Latest version string found by the UpdateChecker, or null if all previous checks have failed
    • getRequesters

      @Nullable public org.bukkit.command.CommandSender[] getRequesters()
      Gets an array of all CommandSenders who have requested this update check. Normally this will either be the ConsoleCommandSender or a player.
      Returns:
      Array of all CommandSenders who have requested this update check
    • setRequesters

      protected UpdateCheckEvent setRequesters(@Nullable org.bukkit.command.CommandSender... requesters)
      Sets the CommandSenders who requested this update check.
      Parameters:
      requesters - CommandSenders who requested this update check
      Returns:
      UpdateCheckEvent instance
    • getResult

      public UpdateCheckResult getResult()
      Gets the result, i.e. whether a new version is available or not.
      Returns:
      UpdateCheckResult of this update check
    • getSuccess

      public UpdateCheckSuccess getSuccess()
      Checks whether the update checking attempt was successful or failed.
      Returns:
      UpdateCheckSuccess of this update check
    • getUsedVersion

      @NotNull public String getUsedVersion()
      Gets the version string of the currently used plugin version.
      Returns:
      Version string of the currently used plugin version