ProjectileItem: fixed error when projectile entity is null

This commit is contained in:
Dylan K. Taylor 2018-03-10 10:59:22 +00:00
parent ad09e8c8d0
commit 606407933e

View File

@ -68,8 +68,10 @@ abstract class ProjectileItem extends Item{
//without this, it doesn't work at all.
$player->getLevel()->broadcastLevelSoundEvent($player, LevelSoundEventPacket::SOUND_THROW, 319);
}
}else{
}elseif($projectile !== null){
$projectile->spawnToAll();
}else{
return false;
}
return true;