diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/regions/Region.java b/BauSystem_Main/src/de/steamwar/bausystem/world/regions/Region.java index bdc95de..a02edfb 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/regions/Region.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/regions/Region.java @@ -141,6 +141,24 @@ public class Region { private Region(ConfigurationSection config) { name = config.getName(); + minPoint = new Point(config.getInt("minX"), config.getInt("minY"), config.getInt("minZ")); + prototype = Prototype.prototypes.get(config.getString("prototype")); + optionsLinkedWith = config.getString("optionsLinkedWith", null); + if (!hasTestblock()) tntMode = TNTMode.OFF; + regions.add(this); + load(); + } + + public Region(String name) { + this.name = name; + this.minPoint = new Point(0, 0, 0); + this.prototype = null; + this.optionsLinkedWith = null; + tntMode = TNTMode.OFF; + load(); + } + + private void load() { if (regionsObject.has(name)) { regionOptions = regionsObject.getAsJsonObject(name); if (regionOptions.has("tnt")) { @@ -171,20 +189,6 @@ public class Region { } else { regionsObject.add(name, regionOptions); } - - minPoint = new Point(config.getInt("minX"), config.getInt("minY"), config.getInt("minZ")); - prototype = Prototype.prototypes.get(config.getString("prototype")); - optionsLinkedWith = config.getString("optionsLinkedWith", null); - if (!hasTestblock()) tntMode = TNTMode.OFF; - regions.add(this); - } - - public Region(String name) { - this.name = name; - this.minPoint = new Point(0, 0, 0); - this.prototype = null; - this.optionsLinkedWith = null; - tntMode = TNTMode.OFF; } public Color getColor() {