Merge branch 'master' into mcpe-1.1

This commit is contained in:
Dylan K. Taylor
2017-05-30 09:45:20 +01:00
9 changed files with 144 additions and 22 deletions

View File

@ -3639,7 +3639,6 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$this->server->getPluginManager()->unsubscribeFromPermission(Server::BROADCAST_CHANNEL_ADMINISTRATIVE, $this);
if($this->joined){
//TODO: add events for player data saving
$this->save();
$this->server->getPluginManager()->callEvent($ev = new PlayerQuitEvent($this, $message));
@ -3740,7 +3739,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
}
$this->namedtag["playerGameType"] = $this->gamemode;
$this->namedtag["lastPlayed"] = new LongTag("lastPlayed", floor(microtime(true) * 1000));
$this->namedtag["lastPlayed"] = floor(microtime(true) * 1000);
if($this->username != "" and $this->namedtag instanceof CompoundTag){
$this->server->saveOfflinePlayerData($this->username, $this->namedtag, $async);