public void StartServer()
    {
        if (Mode != Mode.Inactive)
        {
            throw new ApplicationException("Can't start server if already active.");
        }

        SetupHooks(_contexts);

        _server          = new ServerNetworkSystem(_contexts);
        _server.TickRate = (ushort)TargetTickPerSecond;

        var services = new Services
        {
            ServerSystem = _server
        };

        _serverFeature = new ServerFeature(_contexts, services);
        Mode           = Mode.Server;
    }