From 199fbb644b135a9b930800d584c863545da35a23 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sat, 13 Apr 2013 14:21:58 +0200 Subject: [PATCH] Fixed spawning despawned entities --- src/world/Entity.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/world/Entity.php b/src/world/Entity.php index 3e6dd56b..1b107b4f 100644 --- a/src/world/Entity.php +++ b/src/world/Entity.php @@ -439,11 +439,14 @@ class Entity extends stdClass{ if(!($player instanceof Player)){ $player = $this->server->api->player->get($player); } - if($player->eid === $this->eid){ + if($player->eid === $this->eid or $this->closed !== false){ return false; } switch($this->class){ case ENTITY_PLAYER: + if($this->player->connected !== true){ + return false; + } $player->dataPacket(MC_ADD_PLAYER, array( "clientID" => 0,/*$this->player->clientID,*/ "username" => $this->player->username,