From eadc741137c60f2efd2c2ec5b4fa392b8c0b41f1 Mon Sep 17 00:00:00 2001 From: jojo Date: Wed, 17 Feb 2021 10:06:51 +0100 Subject: [PATCH] Add Region.extensionArea Add Region.extensionAreaEnabled --- .../src/de/steamwar/bausystem/world/Region.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java b/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java index e7a6007..a2a9c48 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java @@ -40,6 +40,7 @@ public class Region { private static final List regions = new ArrayList<>(); private static boolean buildArea = false; + private static boolean extensionArea = false; static{ YamlConfiguration config = new YamlConfiguration(); @@ -66,6 +67,10 @@ public class Region { return buildArea; } + public static boolean extensionAreaEnabled() { + return extensionArea; + } + public static Region getRegion(Location location) { for (Region region : regions) { if (region.inRegion(location)) return region; @@ -264,6 +269,9 @@ public class Region { extensionNegativeZ = config.getInt("extensionNegativeZ", 0); extensionPositiveY = config.getInt("extensionPositiveY", 0); extensionAxisX = config.getInt("extensionAxisX", 0); + if (config.contains("extensionPositiveZ") || config.contains("extensionNegativeZ") || config.contains("extensionPositiveY") || config.contains("extensionAxisX")) { + extensionArea = true; + } rotate = config.getBoolean("rotate", false); ConfigurationSection testblockSection = config.getConfigurationSection("testblock");