Documentation

EntityDeathEvent extends EntityEvent
in package

Tags
phpstan-extends

EntityEvent<Living>

Table of Contents

MAX_EVENT_CALL_DEPTH  = 50
$entity  : Entity
$eventName  : string|null
$drops  : array<string|int, Item>
$eventCallDepth  : int
$xp  : int
__construct()  : mixed
call()  : void
Calls event handlers registered for this event.
getDrops()  : array<string|int, Item>
getEntity()  : Living
getEventName()  : string
getXpDropAmount()  : int
Returns how much experience is dropped due to this entity's death.
setDrops()  : void
setXpDropAmount()  : void

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

__construct()

public __construct(Living $entity[, array<string|int, Item$drops = [] ][, int $xp = 0 ]) : mixed
Parameters
$entity : Living
$drops : array<string|int, Item> = []
$xp : int = 0
Return values
mixed

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

getXpDropAmount()

Returns how much experience is dropped due to this entity's death.

public getXpDropAmount() : int
Return values
int

setDrops()

public setDrops(array<string|int, Item$drops) : void
Parameters
$drops : array<string|int, Item>
Return values
void

setXpDropAmount()

public setXpDropAmount(int $xp) : void
Parameters
$xp : int
Tags
throws
InvalidArgumentException
Return values
void

Search results