diff --git a/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java b/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java index 087a121d..762d6960 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java +++ b/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java @@ -201,7 +201,10 @@ public class ServerStarter { private void tempWorld(String template) { worldDir = TEMP_WORLD_PATH; - worldSetup = () -> copyWorld(node, template, new File(worldDir, worldName).getPath()); + worldSetup = () -> { + mkdirWorldDir(node, worldDir); + copyWorld(node, template, new File(worldDir, worldName).getPath()); + }; worldCleanup = () -> SubserverSystem.deleteFolder(node, new File(worldDir, worldName).getPath()); } @@ -354,6 +357,10 @@ public class ServerStarter { return serverName.replace(' ', '_').replace("[", "").replace("]", "").replace(".", ""); } + public static void mkdirWorldDir(Node node, String targetDir) { + node.execute("mkdir", "p", targetDir); + } + public static void copyWorld(Node node, String template, String target) { node.execute("cp", "-r", template, target); }