Skip to content

EntityRegainHealthEvent ​

class · pocketmine\event\entity\EntityRegainHealthEvent · source

Extends EntityEvent
Implements Cancellable

Constants ​

CAUSE_CUSTOM ​

php
public const CAUSE_CUSTOM = 3

CAUSE_EATING ​

php
public const CAUSE_EATING = 1

CAUSE_MAGIC ​

php
public const CAUSE_MAGIC = 2

CAUSE_REGEN ​

php
public const CAUSE_REGEN = 0

CAUSE_SATURATION ​

php
public const CAUSE_SATURATION = 4

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Entity $entity, float $amount, int $regainReason)

getAmount() ​

php
public function getAmount() : float

getRegainReason() ​

php
public function getRegainReason() : int

Returns one of the CAUSE_* constants to indicate why this regeneration occurred.

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.