GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
EntityRegainHealthEvent Class Reference

Public Member Functions

 __construct (Entity $entity, $amount, $regainReason)
 
 getAmount ()
 
 setAmount ($amount)
 
 getRegainReason ()
 
- Public Member Functions inherited from EntityEvent
 getEntity ()
 
- Public Member Functions inherited from Event
 getEventName ()
 
 getHandlers ()
 
- Public Member Functions inherited from Cancellable
 isCancelled ()
 
 setCancelled ($forceCancel=false)
 

Data Fields

const CAUSE_REGEN = 0
 
const CAUSE_EATING = 1
 
const CAUSE_MAGIC = 2
 
const CAUSE_CUSTOM = 3
 
const CAUSE_SATURATION = 4
 

Static Public Attributes

static $handlerList = null
 

Additional Inherited Members

- Protected Attributes inherited from EntityEvent
 $entity
 
- Protected Attributes inherited from Event
 $eventName = null
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( Entity  $entity,
  $amount,
  $regainReason 
)
Parameters
Entity$entity
float$amount
int$regainReason
45  {
46  $this->entity = $entity;
47  $this->amount = $amount;
48  $this->reason = (int) $regainReason;
49  }

Member Function Documentation

◆ getAmount()

getAmount ( )
Returns
float
54  {
55  return $this->amount;
56  }

◆ getRegainReason()

getRegainReason ( )
Returns
int
68  {
69  return $this->reason;
70  }

◆ setAmount()

setAmount (   $amount)
Parameters
float$amount
61  {
62  $this->amount = $amount;
63  }

Field Documentation

◆ $handlerList

$handlerList = null
static

◆ CAUSE_CUSTOM

const CAUSE_CUSTOM = 3

◆ CAUSE_EATING

const CAUSE_EATING = 1

◆ CAUSE_MAGIC

const CAUSE_MAGIC = 2

◆ CAUSE_REGEN

const CAUSE_REGEN = 0

◆ CAUSE_SATURATION

const CAUSE_SATURATION = 4

The documentation for this class was generated from the following file: