Skip to content

PlayerExhaustEvent ​

class · pocketmine\event\player\PlayerExhaustEvent · source

Extends EntityEvent
Implements Cancellable

Constants ​

CAUSE_ATTACK ​

php
public const CAUSE_ATTACK = 1

CAUSE_CUSTOM ​

php
public const CAUSE_CUSTOM = 11

CAUSE_DAMAGE ​

php
public const CAUSE_DAMAGE = 2

CAUSE_HEALTH_REGEN ​

php
public const CAUSE_HEALTH_REGEN = 4

CAUSE_JUMPING ​

php
public const CAUSE_JUMPING = 9

CAUSE_MINING ​

php
public const CAUSE_MINING = 3

CAUSE_POTION ​

php
public const CAUSE_POTION = 5

CAUSE_SPRINTING ​

php
public const CAUSE_SPRINTING = 7

CAUSE_SPRINT_JUMPING ​

php
public const CAUSE_SPRINT_JUMPING = 10

CAUSE_SWIMMING ​

php
public const CAUSE_SWIMMING = 8

CAUSE_WALKING ​

php
public const CAUSE_WALKING = 6

Properties ​

$human ​

php
public \pocketmine\entity\Human $human

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Human $human, float $amount, int $cause)

getAmount() ​

php
public function getAmount() : float

getCause() ​

php
public function getCause() : int

Returns an int cause of the exhaustion - one of the constants at the top of this class.

getPlayer() ​

php
public function getPlayer()

setAmount() ​

php
public function setAmount(float $amount) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.