mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +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 function __construct(Level $level, CompoundTag $nbt, Entity $shootingEntity = null){
|
||||
parent::__construct($level, $nbt);
|
||||
if($shootingEntity !== null){
|
||||
$this->setOwningEntity($shootingEntity);
|
||||
}
|
||||
parent::__construct($level, $nbt);
|
||||
}
|
||||
|
||||
public function attack(EntityDamageEvent $source){
|
||||
|
Loading…
x
Reference in New Issue
Block a user