GitLab's annual major release is around the corner. Along with a lot of new and exciting features, there will be a few breaking changes. Learn more here.

Commit 923789eb authored by Frago9876543210's avatar Frago9876543210 Committed by GitHub
Browse files

Merge pull request #853 from ivan691/patch-2

Fix no message $player->close , tested!
parents 92cd0f78 7216337a
......@@ -3990,7 +3990,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
public final function close($message = "", $reason = "generic reason", $notify = true){
if($this->connected and !$this->closed){
if($notify and strlen((string) $reason) > 0){
$pk = new DisconnectPacket;
$pk = new DisconnectPacket();
$pk->hideDisconnectionScreen = null;
$pk->message = $reason;
$this->dataPacket($pk);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment