From 8ff9ca5fd359fd011261b9027430cda02a08e7f8 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Mon, 20 Jan 2020 18:34:10 +0100 Subject: [PATCH] Hotfix waiting for world deletion --- src/de/steamwar/bungeecore/SubserverSystem.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/de/steamwar/bungeecore/SubserverSystem.java b/src/de/steamwar/bungeecore/SubserverSystem.java index 50102541..8100c010 100644 --- a/src/de/steamwar/bungeecore/SubserverSystem.java +++ b/src/de/steamwar/bungeecore/SubserverSystem.java @@ -116,8 +116,8 @@ public class SubserverSystem { if(eventFightID == -1) return new Bauserver(serverName, player1, port, process, () -> { try { - new ProcessBuilder("rm", "-r", ARENA_PATH + finalMapName).start(); - } catch (IOException e) { + new ProcessBuilder("rm", "-r", ARENA_PATH + finalMapName).start().waitFor(); + } catch (IOException | InterruptedException e) { throw new SecurityException("Could not clean up folder", e); } }); @@ -127,8 +127,8 @@ public class SubserverSystem { return; try { - new ProcessBuilder("rm", "-r", ARENA_PATH + finalMapName).start(); - } catch (IOException e) { + new ProcessBuilder("rm", "-r", ARENA_PATH + finalMapName).start().waitFor(); + } catch (IOException | InterruptedException e) { throw new SecurityException("Could not clean up folder", e); } });