mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Correct teleporting with the new player list handling
This commit is contained in:
parent
7102787aa9
commit
bf1b00f0e6
4 changed files with 42 additions and 37 deletions
|
|
@ -116,7 +116,7 @@ class EntityAPI{
|
|||
|
||||
public function spawnToAll(Entity $e){
|
||||
foreach($this->server->api->player->getAll($e->level) as $player){
|
||||
if($player->eid !== false and $player->eid !== $e->eid){
|
||||
if($player->eid !== false and $player->eid !== $e->eid and $e->class !== ENTITY_PLAYER){
|
||||
$e->spawn($player);
|
||||
}
|
||||
}
|
||||
|
|
@ -162,7 +162,7 @@ class EntityAPI{
|
|||
$entity->closed = true;
|
||||
$this->server->query("DELETE FROM entities WHERE EID = ".$eid.";");
|
||||
if($entity->class === ENTITY_PLAYER){
|
||||
$this->server->api->player->broadcastPacket($this->server->api->player->getAll($entity->level), MC_REMOVE_PLAYER, array(
|
||||
$this->server->api->player->broadcastPacket($this->server->api->player->getAll(), MC_REMOVE_PLAYER, array(
|
||||
"clientID" => 0,
|
||||
"eid" => $entity->eid,
|
||||
));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue