mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-12 12:55:21 +00:00
EntityDamageByEntityEvent: document methods
This commit is contained in:
parent
a45763328b
commit
c972e65741
@ -62,10 +62,20 @@ class EntityDamageByEntityEvent extends EntityDamageEvent{
|
|||||||
return $this->getEntity()->getWorld()->getServer()->getWorldManager()->findEntity($this->damagerEntityId);
|
return $this->getEntity()->getWorld()->getServer()->getWorldManager()->findEntity($this->damagerEntityId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the force with which the victim will be knocked back from the attacking entity.
|
||||||
|
*
|
||||||
|
* @see Living::DEFAULT_KNOCKBACK_FORCE
|
||||||
|
*/
|
||||||
public function getKnockBack() : float{
|
public function getKnockBack() : float{
|
||||||
return $this->knockBack;
|
return $this->knockBack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the force with which the victim will be knocked back from the attacking entity.
|
||||||
|
* Larger values will knock the victim back further.
|
||||||
|
* Negative values will pull the victim towards the attacker.
|
||||||
|
*/
|
||||||
public function setKnockBack(float $knockBack) : void{
|
public function setKnockBack(float $knockBack) : void{
|
||||||
$this->knockBack = $knockBack;
|
$this->knockBack = $knockBack;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user