mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
Fixed crash
This commit is contained in:
parent
b5c935559f
commit
5683dca9f6
1 changed files with 2 additions and 2 deletions
|
|
@ -378,7 +378,7 @@ class PlayerAPI{
|
||||||
|
|
||||||
public function spawnAllPlayers(Player $player){
|
public function spawnAllPlayers(Player $player){
|
||||||
foreach($this->getAll() as $p){
|
foreach($this->getAll() as $p){
|
||||||
if($p !== $player){
|
if($p !== $player and ($p->entity instanceof Entity)){
|
||||||
$p->entity->spawn($player);
|
$p->entity->spawn($player);
|
||||||
if($p->level !== $player->level){
|
if($p->level !== $player->level){
|
||||||
$player->dataPacket(MC_MOVE_ENTITY_POSROT, array(
|
$player->dataPacket(MC_MOVE_ENTITY_POSROT, array(
|
||||||
|
|
@ -396,7 +396,7 @@ class PlayerAPI{
|
||||||
|
|
||||||
public function spawnToAllPlayers(Player $player){
|
public function spawnToAllPlayers(Player $player){
|
||||||
foreach($this->getAll() as $p){
|
foreach($this->getAll() as $p){
|
||||||
if($p !== $player){
|
if($p !== $player and ($p->entity instanceof Entity)){
|
||||||
$player->entity->spawn($p);
|
$player->entity->spawn($p);
|
||||||
if($p->level !== $player->level){
|
if($p->level !== $player->level){
|
||||||
$p->dataPacket(MC_MOVE_ENTITY_POSROT, array(
|
$p->dataPacket(MC_MOVE_ENTITY_POSROT, array(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue