mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 10:01:53 +00:00
* Fix Projectile::setOwningEntity() on null error
This commit is contained in:
parent
3939e2d9dd
commit
29e06e30b2
@ -43,10 +43,10 @@ abstract class Projectile extends Entity{
|
|||||||
public $hadCollision = false;
|
public $hadCollision = false;
|
||||||
|
|
||||||
public function __construct(Level $level, CompoundTag $nbt, Entity $shootingEntity = null){
|
public function __construct(Level $level, CompoundTag $nbt, Entity $shootingEntity = null){
|
||||||
|
parent::__construct($level, $nbt);
|
||||||
if($shootingEntity !== null){
|
if($shootingEntity !== null){
|
||||||
$this->setOwningEntity($shootingEntity);
|
$this->setOwningEntity($shootingEntity);
|
||||||
}
|
}
|
||||||
parent::__construct($level, $nbt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function attack(EntityDamageEvent $source){
|
public function attack(EntityDamageEvent $source){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user