示例#1
0
        private void OnVoiceServerStopping()
        {
            foreach (var client in GetClients())
            {
                UnregisterPlayer(client.Player);
            }

            OnServerStopping?.Invoke();
        }
        public void Stop()
        {
            if (!Started)
            {
                throw new VoiceServerNotStartedException();
            }

            InvokeProtectedEvent(() => OnServerStopping?.Invoke());

            NativeWrapper.StopNativeServer();

            Started = false;
        }