mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
chunks are now unloaded from memory + rewrite
This commit is contained in:
parent
5cdfedfc75
commit
c371fb9c8a
7 changed files with 298 additions and 208 deletions
|
|
@ -475,13 +475,13 @@ class PlayerAPI{
|
|||
public function remove($CID){
|
||||
if(isset($this->server->clients[$CID])){
|
||||
$player = $this->server->clients[$CID];
|
||||
unset($this->server->clients[$CID]);
|
||||
$player->close();
|
||||
if($player->username != "" and ($player->data instanceof Config)){
|
||||
$this->saveOffline($player->data);
|
||||
}
|
||||
$this->server->query("DELETE FROM players WHERE name = '" . $player->username . "';");
|
||||
$this->server->api->entity->remove($player->eid);
|
||||
unset($this->server->clients[$CID]);
|
||||
if($player->entity instanceof Entity){
|
||||
unset($player->entity->player);
|
||||
//unset($player->entity);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue