mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-18 09:24:05 +00:00
ProjectileItem: fixed error when projectile entity is null
This commit is contained in:
parent
ad09e8c8d0
commit
606407933e
@ -68,8 +68,10 @@ abstract class ProjectileItem extends Item{
|
|||||||
//without this, it doesn't work at all.
|
//without this, it doesn't work at all.
|
||||||
$player->getLevel()->broadcastLevelSoundEvent($player, LevelSoundEventPacket::SOUND_THROW, 319);
|
$player->getLevel()->broadcastLevelSoundEvent($player, LevelSoundEventPacket::SOUND_THROW, 319);
|
||||||
}
|
}
|
||||||
}else{
|
}elseif($projectile !== null){
|
||||||
$projectile->spawnToAll();
|
$projectile->spawnToAll();
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user