PHP Class pocketmine\event\entity\EntityDamageEvent

Inheritance: extends EntityEvent, implements pocketmine\event\Cancellable
Exibir arquivo Open project: iTXTech/Genisys Class Usage Examples

Public Properties

Property Type Description
$handlerList

Public Methods

Method Description
__construct ( Entity $entity, integer $cause, integer | int[] $damage )
createThornsDamage ( )
getCause ( ) : integer
getDamage ( integer $type = self::MODIFIER_BASE ) : integer
getFinalDamage ( ) : integer
getFireProtectL ( ) : Int
getOriginalDamage ( integer $type = self::MODIFIER_BASE ) : integer
getRateDamage ( integer $type = self::MODIFIER_BASE ) : float
getThornsDamage ( )
getUsedArmors ( ) : Item
isApplicable ( integer $type ) : boolean
setDamage ( float $damage, integer $type = self::MODIFIER_BASE )
setRateDamage ( float $damage, integer $type = self::MODIFIER_BASE )
setThornsArmorUse ( ) : boolean
useArmors ( ) : boolean

Method Details

__construct() public method

public __construct ( Entity $entity, integer $cause, integer | int[] $damage )
$entity pocketmine\entity\Entity
$cause integer
$damage integer | int[]

createThornsDamage() public method

public createThornsDamage ( )

getCause() public method

public getCause ( ) : integer
return integer

getDamage() public method

public getDamage ( integer $type = self::MODIFIER_BASE ) : integer
$type integer
return integer

getFinalDamage() public method

public getFinalDamage ( ) : integer
return integer

getFireProtectL() public method

public getFireProtectL ( ) : Int
return Int $fireProtectL

getOriginalDamage() public method

public getOriginalDamage ( integer $type = self::MODIFIER_BASE ) : integer
$type integer
return integer

getRateDamage() public method

public getRateDamage ( integer $type = self::MODIFIER_BASE ) : float
$type integer
return float 1 - the percentage

getThornsDamage() public method

public getThornsDamage ( )

getUsedArmors() public method

public getUsedArmors ( ) : Item
return pocketmine\item\Item $usedArmors notice: $usedArmors $index->$cost $index: the $index of ArmorInventory $cost: the num of durability cost

isApplicable() public method

public isApplicable ( integer $type ) : boolean
$type integer
return boolean

setDamage() public method

public setDamage ( float $damage, integer $type = self::MODIFIER_BASE )
$damage float
$type integer

setRateDamage() public method

public setRateDamage ( float $damage, integer $type = self::MODIFIER_BASE )
$damage float
$type integer Notice:If you want to add/reduce the damage without reducing by Armor or effect. set a new Damage using setDamage Notice:If you want to add/reduce the damage within reducing by Armor of effect. Plz change the MODIFIER_BASE Notice:If you want to add/reduce the damage by multiplying. Plz use this function.

setThornsArmorUse() public method

public setThornsArmorUse ( ) : boolean
return boolean should be used after getThornsDamage()

useArmors() public method

public useArmors ( ) : boolean
return boolean

Property Details

$handlerList public_oe static_oe property

public static $handlerList