EntityDeathEvent
extends EntityEvent
in package
Tags
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
$entity
protected
Entity
$entity
Tags
$eventName
protected
string|null
$eventName
= null
$drops
private
array<string|int, Item>
$drops
= []
$eventCallDepth
private
static int
$eventCallDepth
= 1
$xp
private
int
$xp
Methods
__construct()
public
__construct(Living $entity[, array<string|int, Item> $drops = [] ][, int $xp = 0 ]) : mixed
Parameters
Return values
mixed —call()
Calls event handlers registered for this event.
public
call() : void
Tags
Return values
void —getDrops()
public
getDrops() : array<string|int, Item>
Return values
array<string|int, Item> —getEntity()
public
getEntity() : Living
Return values
Living —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