Class PlayerAttackEntityCooldownResetEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
com.destroystokyo.paper.event.player.PlayerAttackEntityCooldownResetEvent
- All Implemented Interfaces:
- Cancellable
Called when processing a player's attack on an entity when the player's attack strength cooldown is reset
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerAttackEntityCooldownResetEvent(@NotNull Player who, @NotNull Entity attackedEntity, float cooledAttackStrength) 
- 
Method SummaryModifier and TypeMethodDescriptionReturns the entity attacked by the playerfloatGet the value of the players cooldown attack strength when they initiated the attackstatic @NotNull HandlerListbooleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Cancelling this event will prevent the target player from having their cooldown reset from attacking this entityMethods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
PlayerAttackEntityCooldownResetEvent
 
- 
- 
Method Details- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
- 
isCancelledpublic boolean isCancelled()Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other pluginsIf an attack cooldown event is cancelled, the players attack strength will remain at the same value instead of being reset. - Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) Cancelling this event will prevent the target player from having their cooldown reset from attacking this entity- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getCooledAttackStrengthpublic float getCooledAttackStrength()Get the value of the players cooldown attack strength when they initiated the attack- Returns:
- returns the original player cooldown value
 
- 
getAttackedEntityReturns the entity attacked by the player- Returns:
- the entity attacked by the player
 
 
-