From 0eef22aab0c788bf8cf7496eaebbc5e355070f11 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Sat, 20 Jun 2026 17:42:16 +0200 Subject: [PATCH] Fix ServerStarter.tempWorld --- .../src/de/steamwar/velocitycore/ServerStarter.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); }