void OnShutdown() { Console.WriteLine("Application is shutting down"); if (MinecraftService.IsRunning()) { MinecraftService.Stop(); } }
public Task IsRunning() { try { return(Clients.All.SendAsync("IsRunning", MinecraftService.IsRunning())); } catch { } return(Task.CompletedTask); }