Package com.jeff_media.updatechecker
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.protected UpdateCheckEvent
setRequesters
(org.bukkit.command.CommandSender... requesters) Sets the CommandSenders who requested this update check.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
UpdateCheckEvent
-
-
Method Details
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
getHandlers
@NotNull public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
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
Sets the CommandSenders who requested this update check.- Parameters:
requesters
- CommandSenders who requested this update check- Returns:
- UpdateCheckEvent instance
-
getResult
Gets the result, i.e. whether a new version is available or not.- Returns:
- UpdateCheckResult of this update check
-
getSuccess
Checks whether the update checking attempt was successful or failed.- Returns:
- UpdateCheckSuccess of this update check
-
getUsedVersion
Gets the version string of the currently used plugin version.- Returns:
- Version string of the currently used plugin version
-