protected override void OnUnload() { Alex.InGame = false; new Thread( o => { NetworkProvider.Close(); World.Destroy(); WorldProvider.Dispose(); _playingHud.Unload(); //var threadPool = // ReflectionHelper.GetPrivateStaticPropertyValue<MiNET.Utils.DedicatedThreadPool>( // typeof(MiNetServer), "FastThreadPool"); //threadPool?.Dispose(); //ReflectionHelper.SetPrivateStaticPropertyValue<MiNET.Utils.DedicatedThreadPool>(typeof(MiNetServer), "FastThreadPool", null); RichPresenceProvider.ClearPresence(); }).Start(); //GetService<IEventDispatcher>().UnregisterEvents(_playingHud.Chat); //_playingHud.Chat = }
protected override void OnUnload() { Alex.InGame = false; World.Destroy(); WorldProvider.Dispose(); NetworkProvider.Close(); _playingHud.Unload(); RichPresenceProvider.ClearPresence(); //GetService<IEventDispatcher>().UnregisterEvents(_playingHud.Chat); //_playingHud.Chat = }