From 84069f79e9977bcfd1e37c7ee86d419eead7ec3a Mon Sep 17 00:00:00 2001 From: kotyaralih <62548070+kotyaralih@users.noreply.github.com> Date: Wed, 29 Dec 2021 00:38:16 -0800 Subject: [PATCH] that looks better --- src/Player.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Player.php b/src/Player.php index d3837495..1aaa2ccf 100644 --- a/src/Player.php +++ b/src/Player.php @@ -291,10 +291,6 @@ class Player{ $this->directDataPacket(MC_DISCONNECT); $this->connected = false; $this->level->freeAllChunks($this); - if($msg === true and $this->username != "" and $this->spawned !== false){ - $this->server->api->chat->broadcast($this->username." left the game"); - } - $this->spawned = false; $this->loggedIn = false; $this->buffer = null; unset($this->buffer); @@ -304,6 +300,10 @@ class Player{ $this->ackQueue = array(); $this->server->interface->stopChunked($this->CID); $this->server->api->player->remove($this->CID); + if($msg === true and $this->username != "" and $this->spawned !== false){ + $this->server->api->chat->broadcast($this->username." left the game"); + } + $this->spawned = false; console("[INFO] ".FORMAT_AQUA.$this->username.FORMAT_RESET."[/".$this->ip.":".$this->port."] logged out due to ".$reason); $this->windows = array(); $this->armor = array();