From 9bb234bf32b8bcbf9f41272c2c490a0d1bdcba9e Mon Sep 17 00:00:00 2001 From: jojo Date: Wed, 20 Jan 2021 21:03:04 +0100 Subject: [PATCH 1/3] 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; -- 2.39.5 From 84686357c598977ea13ad19cad11e7f3f0b92fae Mon Sep 17 00:00:00 2001 From: jojo Date: Fri, 22 Jan 2021 14:02:01 +0100 Subject: [PATCH 2/3] Fix PR stuff --- BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java index 279e3fb..4dbb0a1 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java @@ -75,8 +75,6 @@ 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()); -- 2.39.5 From 36a601a610f9eda8fe4278d3065d10fc25cdb9f7 Mon Sep 17 00:00:00 2001 From: jojo Date: Fri, 22 Jan 2021 16:13:32 +0100 Subject: [PATCH 3/3] Fix PR stuff --- BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java | 1 - BauSystem_Main/src/de/steamwar/bausystem/world/Region.java | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java index 4dbb0a1..9a7276b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java @@ -42,7 +42,6 @@ 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; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java b/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java index f428ee3..a518b80 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java @@ -105,7 +105,6 @@ public class Region { } public static class Prototype{ - private static final String SECTION_PATH = Bukkit.getWorlds().get(0).getWorldFolder().getAbsolutePath() + "/"; private static final Map prototypes = new HashMap<>(); private final int sizeX; @@ -147,7 +146,7 @@ public class Region { } public void fastreset(Region region){ - File file = new File(SECTION_PATH + schematic); + File file = new File(schematic); int x = region.minX + offsetX + sizeX/2; int y = region.minY + offsetY; int z = region.minZ + offsetZ + sizeZ/2; @@ -166,7 +165,7 @@ public class Region { int y = region.minY + offsetY; int z = region.minZ + offsetZ + sizeZ / 2; if(schem == null) - paste(new File(SECTION_PATH + schematic), x, y, z, rotate); + paste(new File(schematic), x, y, z, rotate); else paste(schem.load(), x, y, z, rotate); } @@ -180,7 +179,7 @@ public class Region { int y = region.minY + testblock.offsetY - 1; int z = region.minZ + offsetZ + sizeZ / 2; if(schem == null) - paste(new File(SECTION_PATH + protectSchematic), x, y, z, rotate); + paste(new File(protectSchematic), x, y, z, rotate); else paste(schem.load(), x, y, z, rotate); } -- 2.39.5