PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
pocketmine\event\entity\EntityDamageByChildEntityEvent Class Reference
+ Inheritance diagram for pocketmine\event\entity\EntityDamageByChildEntityEvent:
+ Collaboration diagram for pocketmine\event\entity\EntityDamageByChildEntityEvent:

Public Member Functions

 __construct (Entity $damager, Entity $childEntity, Entity $entity, $cause, $damage)
 
 getChild ()
 
 getDamager ()
 
 getKnockBack ()
 
 setKnockBack ($knockBack)
 
 getCause ()
 
 getOriginalDamage ($type=self::MODIFIER_BASE)
 
 getDamage ($type=self::MODIFIER_BASE)
 
 setDamage ($damage, $type=self::MODIFIER_BASE)
 
 isApplicable ($type)
 
 getFinalDamage ()
 
 getEntity ()
 
 getEventName ()
 
 getHandlers ()
 
 isCancelled ()
 
 setCancelled ($forceCancel=false)
 

Public Attributes

const MODIFIER_BASE = 0
 
const MODIFIER_ARMOR = 1
 
const CAUSE_CONTACT = 0
 
const CAUSE_ENTITY_ATTACK = 1
 
const CAUSE_PROJECTILE = 2
 
const CAUSE_SUFFOCATION = 3
 
const CAUSE_FALL = 4
 
const CAUSE_FIRE = 5
 
const CAUSE_FIRE_TICK = 6
 
const CAUSE_LAVA = 7
 
const CAUSE_DROWNING = 8
 
const CAUSE_BLOCK_EXPLOSION = 9
 
const CAUSE_ENTITY_EXPLOSION = 10
 
const CAUSE_VOID = 11
 
const CAUSE_SUICIDE = 12
 
const CAUSE_MAGIC = 13
 
const CAUSE_CUSTOM = 14
 

Static Public Attributes

static $eventPool = []
 
static $nextEvent = 0
 
static $handlerList = null
 

Protected Attributes

 $entity
 
 $eventName = null
 

Detailed Description

Definition at line 26 of file EntityDamageByChildEntityEvent.php.

Constructor & Destructor Documentation

pocketmine\event\entity\EntityDamageByChildEntityEvent::__construct ( Entity  $damager,
Entity  $childEntity,
Entity  $entity,
  $cause,
  $damage 
)
Parameters
Entity$damager
Entity$childEntity
Entity$entity
int$cause
int|int[]$damage

Definition at line 41 of file EntityDamageByChildEntityEvent.php.

Member Function Documentation

pocketmine\event\entity\EntityDamageEvent::getCause ( )
inherited
Returns
int

Definition at line 86 of file EntityDamageEvent.php.

pocketmine\event\entity\EntityDamageByChildEntityEvent::getChild ( )
Returns
Entity

Definition at line 49 of file EntityDamageByChildEntityEvent.php.

pocketmine\event\entity\EntityDamageEvent::getDamage (   $type = self::MODIFIER_BASE)
inherited
Parameters
int$type
Returns
int

Definition at line 108 of file EntityDamageEvent.php.

pocketmine\event\entity\EntityDamageByEntityEvent::getDamager ( )
inherited
Returns
Entity

Definition at line 51 of file EntityDamageByEntityEvent.php.

pocketmine\event\Event::getEventName ( )
finalinherited
Returns
string

Definition at line 45 of file Event.php.

References pocketmine\event\Event\$eventName.

Referenced by pocketmine\plugin\PluginManager\callEvent().

+ Here is the caller graph for this function:

pocketmine\event\entity\EntityDamageEvent::getFinalDamage ( )
inherited
Returns
int

Definition at line 141 of file EntityDamageEvent.php.

pocketmine\event\Event::getHandlers ( )
inherited
Returns
HandlerList

Definition at line 82 of file Event.php.

Referenced by pocketmine\plugin\PluginManager\callEvent().

+ Here is the caller graph for this function:

pocketmine\event\entity\EntityDamageByEntityEvent::getKnockBack ( )
inherited
Returns
float

Definition at line 57 of file EntityDamageByEntityEvent.php.

pocketmine\event\entity\EntityDamageEvent::getOriginalDamage (   $type = self::MODIFIER_BASE)
inherited
Parameters
int$type
Returns
int

Definition at line 95 of file EntityDamageEvent.php.

pocketmine\event\entity\EntityDamageEvent::isApplicable (   $type)
inherited
Parameters
int$type
Returns
bool

Definition at line 134 of file EntityDamageEvent.php.

pocketmine\event\entity\EntityDamageEvent::setDamage (   $damage,
  $type = self::MODIFIER_BASE 
)
inherited
Parameters
float$damage
int$type
Exceptions
\UnexpectedValueException

Definition at line 122 of file EntityDamageEvent.php.

pocketmine\event\entity\EntityDamageByEntityEvent::setKnockBack (   $knockBack)
inherited
Parameters
float$knockBack

Definition at line 63 of file EntityDamageByEntityEvent.php.

Member Data Documentation

pocketmine\event\Event::$eventName = null
protectedinherited

Any callable event must declare the static variable

public static $handlerList = null; public static $eventPool = []; public static $nextEvent = 0;

Not doing so will deny the proper event initialization

Definition at line 39 of file Event.php.

Referenced by pocketmine\event\Event\getEventName().


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