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