Moved connected flag up in the Player disconnect process

This commit is contained in:
Shoghi Cervantes
2014-10-05 22:51:20 +02:00
parent 571e2f8895
commit 376e359577
2 changed files with 2 additions and 2 deletions

View File

@@ -2241,6 +2241,8 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
$this->tasks = [];
if($this->connected === true){
$this->connected = false;
if($this->username != ""){
$this->server->getPluginManager()->callEvent($ev = new PlayerQuitEvent($this, $message));
if($this->server->getAutoSave() and $this->loggedIn === true){
@@ -2248,7 +2250,6 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
}
}
$this->connected = false;
$this->interface->close($this, $reason);
$this->getLevel()->freeAllChunks($this);