mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 15:41:33 +00:00
Added EntityDamageByBlockEvent (child of EntityDamageEvent)
This commit is contained in:
@@ -127,15 +127,17 @@ class Arrow extends Projectile{
|
||||
|
||||
if(!$ev->isCancelled()){
|
||||
$movingObjectPosition->entityHit->attack($ev->getFinalDamage(), $ev);
|
||||
if($this->fireTicks > 0){
|
||||
$ev = new EntityCombustByEntityEvent($this, $movingObjectPosition->entityHit, 5);
|
||||
$this->server->getPluginManager()->callEvent($ev);
|
||||
if(!$ev->isCancelled()){
|
||||
$movingObjectPosition->entityHit->setOnFire($ev->getDuration());
|
||||
}
|
||||
}
|
||||
$this->kill();
|
||||
}
|
||||
|
||||
if($this->fireTicks > 0){
|
||||
$ev = new EntityCombustByEntityEvent($this, $movingObjectPosition->entityHit, 5);
|
||||
$this->server->getPluginManager()->callEvent($ev);
|
||||
if(!$ev->isCancelled()){
|
||||
$movingObjectPosition->entityHit->setOnFire($ev->getDuration());
|
||||
}
|
||||
}
|
||||
|
||||
$this->kill();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user