PlayerHurtEntityEvent

@Since(version = "2.2")
class PlayerHurtEntityEvent(val damager: Player, val victim: Entity, val cause: EntityDamageEvent.DamageCause, val damage: Double) : Event, Cancellable

This event is called when a player damages an entity.

Parameters

damager

The player that hit the entity.

victim

The entity that was hit.

cause

The cause of the damage.

damage

The damage that the victim will take.

Constructors

Link copied to clipboard
constructor(damager: Player, victim: Entity, cause: EntityDamageEvent.DamageCause, damage: Double)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val cause: EntityDamageEvent.DamageCause
Link copied to clipboard
Link copied to clipboard
val damager: Player
Link copied to clipboard
val victim: Entity

Functions

Link copied to clipboard
@NotNull
open fun getEventName(): String
Link copied to clipboard
open override fun getHandlers(): HandlerList
Link copied to clipboard
Link copied to clipboard
open override fun isCancelled(): Boolean
Link copied to clipboard
open override fun setCancelled(cancel: Boolean)