Added /save-on, /save-off, /save-all

This commit is contained in:
Shoghi Cervantes
2014-04-02 04:37:58 +02:00
parent 9a5ffbe56c
commit a4630372fa
6 changed files with 186 additions and 11 deletions

View File

@ -2272,9 +2272,6 @@ class Player extends Human implements CommandSender, IPlayer{
if($this->loggedIn === true){
parent::close();
$this->save();
if($this->namedtag instanceof Compound){
$this->server->saveOfflinePlayerData($this->username, $this->namedtag);
}
}
}
@ -2331,6 +2328,10 @@ class Player extends Human implements CommandSender, IPlayer{
$this->namedtag["lastPlayed"] = floor(microtime(true) * 1000);
//$this->data->set("health", $this->getHealth());
if($this->username != "" and $this->isOnline() and $this->namedtag instanceof Compound){
$this->server->saveOfflinePlayerData($this->username, $this->namedtag);
}
}
/**