From 9bb234bf32b8bcbf9f41272c2c490a0d1bdcba9e Mon Sep 17 00:00:00 2001 From: jojo Date: Wed, 20 Jan 2021 21:03:04 +0100 Subject: [PATCH] Fix Region.Prototype.SECTION_PATH --- BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java | 3 +++ BauSystem_Main/src/de/steamwar/bausystem/world/Region.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java index 9a7276b..279e3fb 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java @@ -42,6 +42,7 @@ import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.scheduler.BukkitTask; +import java.nio.file.Paths; import java.util.UUID; import java.util.logging.Level; @@ -74,6 +75,8 @@ public class BauSystem extends JavaPlugin implements Listener { return; } + System.out.println(Bukkit.getWorlds().get(0).getWorldFolder().getAbsolutePath()); + getCommand("trace").setExecutor(new CommandTrace()); getCommand("trace").setTabCompleter(new CommandTraceTabCompleter()); getCommand("tpslimit").setExecutor(new CommandTPSLimiter()); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java b/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java index d066d09..f428ee3 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java @@ -105,7 +105,7 @@ public class Region { } public static class Prototype{ - private static final String SECTION_PATH = "/home/minecraft/backbone/server/UserBau/"; + private static final String SECTION_PATH = Bukkit.getWorlds().get(0).getWorldFolder().getAbsolutePath() + "/"; private static final Map prototypes = new HashMap<>(); private final int sizeX;