Package com.vexsoftware.votifier.model
Class VotifierEvent
java.lang.Object
org.bukkit.event.Event
com.vexsoftware.votifier.model.VotifierEvent
public class VotifierEvent
extends org.bukkit.event.Event
VotifierEvent is a custom Bukkit event class that is sent
synchronously to CraftBukkit's main thread allowing other plugins to listen
for votes.
It will only be sent asynchronously when running under Folia.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionVotifierEvent(com.vexsoftware.votifier.model.Vote vote) Constructs a vote event that encapsulated the given vote record.VotifierEvent(com.vexsoftware.votifier.model.Vote vote, boolean async) Constructs a vote event that encapsulated the given vote record. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListcom.vexsoftware.votifier.model.VotegetVote()Return the encapsulated vote record.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
VotifierEvent
public VotifierEvent(com.vexsoftware.votifier.model.Vote vote) Constructs a vote event that encapsulated the given vote record.- Parameters:
vote- vote record
-
VotifierEvent
public VotifierEvent(com.vexsoftware.votifier.model.Vote vote, boolean async) Constructs a vote event that encapsulated the given vote record.- Parameters:
vote- vote recordasync- whether the event will be fired asynchronously
-
-
Method Details
-
getVote
public com.vexsoftware.votifier.model.Vote getVote()Return the encapsulated vote record.- Returns:
- vote record
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-