Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Commit

Permalink
Moved connected flag up in the Player disconnect process
Browse files Browse the repository at this point in the history
  • Loading branch information
shoghicp committed Oct 5, 2014
1 parent 571e2f8 commit 376e359
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/pocketmine/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -2241,14 +2241,15 @@ public function close($message = "", $reason = "generic reason"){
$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){
$this->save();
}
}

$this->connected = false;
$this->interface->close($this, $reason);
$this->getLevel()->freeAllChunks($this);

Expand Down
1 change: 0 additions & 1 deletion src/pocketmine/level/format/generic/BaseFullChunk.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
use pocketmine\level\format\FullChunk;
use pocketmine\level\format\LevelProvider;
use pocketmine\nbt\tag\Compound;
use pocketmine\nbt\tag\String;
use pocketmine\Player;
use pocketmine\tile\Chest;
use pocketmine\tile\Furnace;
Expand Down

0 comments on commit 376e359

Please sign in to comment.