public function onPlayerDisconnect($login, $disconnectionReason)
    {
        $playerData = $this->playerStorage->getPlayerInfo($login);

        // dedicated server sends disconnect for server itself when it's closed...
        // so it's time to stop application gracefully.
        if ($playerData->getPlayerId() == 0) {
            // emit event to plugins
            $this->application->stopApplication();
            return;
        }

        $this->playerStorage->onPlayerDisconnect($playerData, $disconnectionReason);
        $this->dispatch(__FUNCTION__, [$playerData, $disconnectionReason]);
    }