Class RevivalItemUseEvent
java.lang.Object
org.bukkit.event.Event
dev.itsharshxd.zentrix.api.events.ZentrixEvent
dev.itsharshxd.zentrix.api.events.ZentrixGameEvent
dev.itsharshxd.zentrix.api.events.revival.RevivalItemUseEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public final class RevivalItemUseEvent
extends ZentrixGameEvent
implements org.bukkit.event.Cancellable
Called when a living player uses the Revival Star from
content/items.yml, after Zentrix
checked that they may revive in this match and phase, and before the teammate picker opens.
Cancelling keeps the picker closed; the star is not consumed either way - only a completed
revival spends it, see RevivalItemConsumeEvent. A listener that cancels can, for
instance, open its own picker and call RevivalService#revive.
Main thread; only fired while a listener is registered.
- Since:
- 1.8.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionRevivalItemUseEvent(@NotNull ZentrixGame game, @NotNull org.bukkit.entity.Player player) -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListGets the handler list for this event.@NotNull org.bukkit.entity.PlayerThe player using the star.booleanvoidsetCancelled(boolean cancelled) Methods inherited from class dev.itsharshxd.zentrix.api.events.ZentrixGameEvent
getArenaName, getGame, getGameId, getGameState, getGameTypeName, getPlayerCount, getRuntimeId, getSourceArenaNameMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
RevivalItemUseEvent
public RevivalItemUseEvent(@NotNull @NotNull ZentrixGame game, @NotNull @NotNull org.bukkit.entity.Player player)
-
-
Method Details
-
getPlayer
@NotNull public @NotNull org.bukkit.entity.Player getPlayer()The player using the star. -
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Description copied from class:ZentrixGameEventGets the handler list for this event.- Overrides:
getHandlersin classZentrixGameEvent- Returns:
- The handler list
-
getHandlerList
@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
-