public class PlayerAttackEntityCooldownResetEvent extends PlayerEvent implements Cancellable
Event.Result
player
Constructor and Description |
---|
PlayerAttackEntityCooldownResetEvent(@NotNull Player who,
@NotNull Entity attackedEntity,
float cooledAttackStrength) |
Modifier and Type | Method and Description |
---|---|
@NotNull Entity |
getAttackedEntity()
Returns the entity attacked by the player
|
float |
getCooledAttackStrength()
Get the value of the players cooldown attack strength when they initiated the attack
|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
boolean |
isCancelled()
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel)
Cancelling this event will prevent the target player from having their cooldown reset from attacking this entity
|
getPlayer
callEvent, getEventName, isAsynchronous
@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
public boolean isCancelled()
If an attack cooldown event is cancelled, the players attack strength will remain at the same value instead of being reset.
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this eventpublic float getCooledAttackStrength()
Copyright © 2021. All rights reserved.