From d5a6be70ac63422c02410ffc94bc2fa00294c4a6 Mon Sep 17 00:00:00 2001 From: kotyaralih <62548070+kotyaralih@users.noreply.github.com> Date: Sat, 4 Dec 2021 14:20:07 -0800 Subject: [PATCH] Hide leave messages from non-spawned players --- src/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Player.php b/src/Player.php index 67f91b74..088b3fbe 100644 --- a/src/Player.php +++ b/src/Player.php @@ -301,7 +301,7 @@ class Player{ $this->ackQueue = array(); $this->server->interface->stopChunked($this->CID); $this->server->api->player->remove($this->CID); - if($msg === true and $this->username != ""){ + if($msg === true and $this->username != "" and $this->spawned !== false){ $this->server->api->chat->broadcast($this->username." left the game"); } console("[INFO] ".FORMAT_AQUA.$this->username.FORMAT_RESET."[/".$this->ip.":".$this->port."] logged out due to ".$reason);