PlayerExhaustEvent
extends EntityEvent
in package
implements
Cancellable
Uses
CancellableTrait
Tags
Interfaces, Classes, Traits and Enums
- Cancellable
- This interface is implemented by an Event subclass if and only if it can be cancelled.
Table of Contents
- CAUSE_ATTACK = 1
- CAUSE_CUSTOM = 11
- CAUSE_DAMAGE = 2
- CAUSE_HEALTH_REGEN = 4
- CAUSE_JUMPING = 9
- CAUSE_MINING = 3
- CAUSE_POTION = 5
- CAUSE_SPRINT_JUMPING = 10
- CAUSE_SPRINTING = 7
- CAUSE_SWIMMING = 8
- CAUSE_WALKING = 6
- MAX_EVENT_CALL_DEPTH = 50
- $entity : Entity
- $eventName : string|null
- $player : Human
- $amount : float
- $cause : int
- $eventCallDepth : int
- $isCancelled : bool
- __construct() : mixed
- call() : void
- Calls event handlers registered for this event.
- cancel() : void
- getAmount() : float
- getCause() : int
- Returns an int cause of the exhaustion - one of the constants at the top of this class.
- getEntity() : Entity
- getEventName() : string
- getPlayer() : Human
- isCancelled() : bool
- setAmount() : void
- uncancel() : void
Constants
CAUSE_ATTACK
public
mixed
CAUSE_ATTACK
= 1
CAUSE_CUSTOM
public
mixed
CAUSE_CUSTOM
= 11
CAUSE_DAMAGE
public
mixed
CAUSE_DAMAGE
= 2
CAUSE_HEALTH_REGEN
public
mixed
CAUSE_HEALTH_REGEN
= 4
CAUSE_JUMPING
public
mixed
CAUSE_JUMPING
= 9
CAUSE_MINING
public
mixed
CAUSE_MINING
= 3
CAUSE_POTION
public
mixed
CAUSE_POTION
= 5
CAUSE_SPRINT_JUMPING
public
mixed
CAUSE_SPRINT_JUMPING
= 10
CAUSE_SPRINTING
public
mixed
CAUSE_SPRINTING
= 7
CAUSE_SWIMMING
public
mixed
CAUSE_SWIMMING
= 8
CAUSE_WALKING
public
mixed
CAUSE_WALKING
= 6
MAX_EVENT_CALL_DEPTH
private
mixed
MAX_EVENT_CALL_DEPTH
= 50
Properties
$entity
protected
Entity
$entity
Tags
$eventName
protected
string|null
$eventName
= null
$player
protected
Human
$player
$amount
private
float
$amount
$cause
private
int
$cause
$eventCallDepth
private
static int
$eventCallDepth
= 1
$isCancelled
private
bool
$isCancelled
= false
Methods
__construct()
public
__construct(Human $human, float $amount, int $cause) : mixed
Parameters
- $human : Human
- $amount : float
- $cause : int
Return values
mixed —call()
Calls event handlers registered for this event.
public
call() : void
Tags
Return values
void —cancel()
public
cancel() : void
Return values
void —getAmount()
public
getAmount() : float
Return values
float —getCause()
Returns an int cause of the exhaustion - one of the constants at the top of this class.
public
getCause() : int
Return values
int —getEntity()
public
getEntity() : Entity
Tags
Return values
Entity —getEventName()
public
final getEventName() : string
Return values
string —getPlayer()
public
getPlayer() : Human
Return values
Human —isCancelled()
public
isCancelled() : bool
Return values
bool —setAmount()
public
setAmount(float $amount) : void
Parameters
- $amount : float
Return values
void —uncancel()
public
uncancel() : void