diff --git a/classes/API/ConsoleAPI.php b/classes/API/ConsoleAPI.php index 7c5fd8ea..0d056ece 100644 --- a/classes/API/ConsoleAPI.php +++ b/classes/API/ConsoleAPI.php @@ -156,7 +156,7 @@ class ConsoleAPI{ $this->server->api->setProperty("white-list", false); break; default: - console("[INFO] Usage: /whitelist [username]"); + console("[INFO] Usage: /whitelist [username]"); break; } break; diff --git a/classes/Session.class.php b/classes/Session.class.php index 632cc074..c9ae5840 100644 --- a/classes/Session.class.php +++ b/classes/Session.class.php @@ -85,12 +85,12 @@ class Session{ $this->server->deleteEvent($ev[0], $ev[1]); } $this->eventHandler("You have been kicked. Reason: ".$reason, "onChat"); + $this->dataPacket(MC_DISCONNECT); $this->connected = false; if($msg === true){ $this->server->trigger("onChat", $this->username." left the game"); } console("[INFO] Session with ".$this->ip.":".$this->port." Client ID ".$this->clientID." closed due to ".$reason); - $this->dataPacket(MC_DISCONNECT); $this->server->api->player->remove($this->CID); }