Class PlayerTriggerAnimationEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.marcely.bedwars.api.cosmetics.event.PlayerTriggerAnimationEvent
- All Implemented Interfaces:
ArenaEvent
,Cancellable
Gets called when a player triggers a cosmetic during a match.
More precisely, this is event is called right before the animation of the player's current active cosmetic is played.
This event is only called for items of the category CosmeticItemCategory.isAnimation()
.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerTriggerAnimationEvent
(Player player, Arena arena, CosmeticItem cosmetic) -
Method Summary
Modifier and TypeMethodDescriptiongetArena()
Gets the arena the player is playing in.Gets the cosmetic item the player is trying to trigger.static HandlerList
Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
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
Methods inherited from interface org.bukkit.event.Cancellable
isCancelled, setCancelled
-
Constructor Details
-
PlayerTriggerAnimationEvent
-
-
Method Details
-
getCosmetic
Gets the cosmetic item the player is trying to trigger.CosmeticItem.getBehaviour()
is always equal toCosmeticItemBehaviour.SET_ACTIVE
.- Returns:
- The cosmetic item the player is trying to trigger.
-
getArena
Gets the arena the player is playing in.- Specified by:
getArena
in interfaceArenaEvent
- Returns:
- The arena in which the match is hold.
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-