diff --git a/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java b/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java index a4dc58fc..eab63787 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java +++ b/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java @@ -303,7 +303,7 @@ public class ServerStarter { worldSetup.run(); arguments.put("logPath", worldName); - File checkpointDir = new File("/tmp/" + System.getProperty("user.name") + ".checkpoints/" + directory.getName() + "/" + worldName); + File checkpointDir = checkpointDir(directory, worldName); if (checkpoint) { arguments.put("checkpoint", checkpointDir.getPath()); } @@ -326,6 +326,10 @@ public class ServerStarter { }).schedule(); } + public static File checkpointDir(File serverDirectory, String worldName) { + return new File("/tmp/" + System.getProperty("user.name") + ".checkpoints/" + serverDirectory.getName() + "/" + worldName); + } + private void regularStart(String serverName, int port) { postStart(constructor.construct(serverName, port, node.startServer( version, directory, worldDir, worldName, port, arguments.entrySet().stream().map(entry -> entry.getKey() + "=" + entry.getValue()).toArray(String[]::new) diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/BauCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/BauCommand.java index 048e3125..d97e1e46 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/BauCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/BauCommand.java @@ -261,6 +261,7 @@ public class BauCommand extends SWCommand { } SubserverSystem.deleteFolder(VelocityCore.local, world); + SubserverSystem.deleteFolder(VelocityCore.local, ServerStarter.checkpointDir(version.getServerDirectory("Bau"), String.valueOf(sender.user().getId())).getPath()); sender.system("BAU_DELETE_DELETED"); }).schedule();