mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 03:51:37 +00:00
Re-fixed #45 and other bugs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user