From a92642e612472b01d0d114e32db1fa62c6ee1b78 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 3 Apr 2021 10:23:38 +0200 Subject: [PATCH] Hotfix stop after 5min --- src/de/steamwar/bungeecore/Subserver.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/bungeecore/Subserver.java b/src/de/steamwar/bungeecore/Subserver.java index a01cf05..7813460 100644 --- a/src/de/steamwar/bungeecore/Subserver.java +++ b/src/de/steamwar/bungeecore/Subserver.java @@ -132,8 +132,9 @@ public class Subserver implements Runnable { public void waitForTermination(){ try { - if(!process.waitFor(5, TimeUnit.MINUTES)) + if(!process.waitFor(5, TimeUnit.MINUTES) && server.getPlayers().isEmpty()){ process.destroy(); + } }catch(InterruptedException e){ logger.log(Level.SEVERE, "Subserver stop interrupted!", e); Thread.currentThread().interrupt();