HitBoxDamagedEvent

Triggered when a model's hitbox is damaged.

This event allows modifying the damage amount or cancelling the damage entirely.

Since

2.0.0

Constructors

Link copied to clipboard
@ApiStatus.Internal
constructor(@NotNull hitBox: @NotNull HitBox, @NotNull source: @NotNull ModelDamageSource, damage: Float)
Creates a new ModelDamagedEvent.

Functions

Link copied to clipboard
open fun call(): Boolean
Dispatches this event to the global event bus.
Link copied to clipboard
@NotNull
abstract fun getHitBox(): @NotNull HitBox
Returns the target hitbox of this event.
Link copied to clipboard
abstract fun isCancelled(): Boolean
Checks if the event has been canceled.
Link copied to clipboard
abstract fun setCancelled(cancel: Boolean)
Sets the cancellation state of the event.