Documentation

ProjectileHitEntityEvent extends ProjectileHitEvent
in package

Table of Contents

MAX_EVENT_CALL_DEPTH  = 50
$entity  : Entity
$eventName  : string|null
$entityHit  : Entity
$eventCallDepth  : int
$rayTraceResult  : RayTraceResult
__construct()  : mixed
call()  : void
Calls event handlers registered for this event.
getEntity()  : Entity
getEntityHit()  : Entity
Returns the Entity struck by the projectile.
getEventName()  : string
getRayTraceResult()  : RayTraceResult
Returns a RayTraceResult object containing information such as the exact position struck, the AABB it hit, and the face of the AABB that it hit.

Constants

MAX_EVENT_CALL_DEPTH

private mixed MAX_EVENT_CALL_DEPTH = 50

Properties

$eventName

protected string|null $eventName = null

$eventCallDepth

private static int $eventCallDepth = 1

Methods

call()

Calls event handlers registered for this event.

public call() : void
Tags
throws
RuntimeException

if event call recursion reaches the max depth limit

Return values
void

getEventName()

public final getEventName() : string
Return values
string

getRayTraceResult()

Returns a RayTraceResult object containing information such as the exact position struck, the AABB it hit, and the face of the AABB that it hit.

public getRayTraceResult() : RayTraceResult
Return values
RayTraceResult

Search results