Player: close session in interface right at the top

I don't know why this would be anywhere _but_ here...
This commit is contained in:
Dylan K. Taylor 2018-03-24 13:00:44 +00:00
parent a4c50d3204
commit 2b37b4a659

View File

@ -3331,7 +3331,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
$pk->message = $reason;
$this->directDataPacket($pk);
}
$this->interface->close($this, $notify ? $reason : "");
$this->sessionAdapter = null;
$this->server->getPluginManager()->unsubscribeFromPermission(Server::BROADCAST_CHANNEL_USERS, $this);
@ -3408,7 +3408,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
}catch(\Throwable $e){
$this->server->getLogger()->logException($e);
}finally{
$this->interface->close($this, $notify ? $reason : "");
$this->server->removePlayer($this);
}
}