From e9906c942deffd57058b6e6b1fb1e2ffb9c965c3 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Thu, 17 Mar 2022 14:40:43 +0100 Subject: [PATCH] Enable command execution, force destruction --- src/de/steamwar/bungeecore/Subserver.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/bungeecore/Subserver.java b/src/de/steamwar/bungeecore/Subserver.java index b9157c7..4343475 100644 --- a/src/de/steamwar/bungeecore/Subserver.java +++ b/src/de/steamwar/bungeecore/Subserver.java @@ -130,11 +130,15 @@ public class Subserver implements Runnable { } } + public void execute(String command) { + writer.println(command); + } + public void stop(){ - writer.println("stop"); + execute("stop"); try { if(!process.waitFor(1, TimeUnit.MINUTES)) - process.destroy(); + process.destroyForcibly(); thread.join(); }catch(InterruptedException e){ logger.log(Level.SEVERE, "Subserver stop interrupted!", e);