Re-fixed #45 and other bugs

This commit is contained in:
Shoghi Cervantes Pueyo 2013-01-12 10:05:27 +01:00
parent 8bc115a2ab
commit 13f4f3285f
2 changed files with 3 additions and 3 deletions

View File

@ -202,11 +202,12 @@ class PlayerAPI{
public function remove($CID){
if(isset($this->server->clients[$CID])){
$player = $this->server->clients[$CID];
unset($this->server->clients[$player->CID]);
unset($this->server->clients[$CID]);
$player->close();
$this->saveOffline($player->username, $player->data);
$this->server->query("DELETE FROM players WHERE name = '".$player->username."';");
unset($player);
$this->server->api->entity->remove($player->eid);
unset($player);
}
}

View File

@ -250,7 +250,6 @@ class Player{
break;
case MC_DISCONNECT:
$this->connected = false;
$this->close("client disconnect");
break;
case MC_CLIENT_CONNECT: