SteamWar/BauSystem
Archiviert
13
0

Add Region.extensionArea

Add Region.extensionAreaEnabled
Dieser Commit ist enthalten in:
jojo 2021-02-17 10:06:51 +01:00
Ursprung 10ef5cb536
Commit eadc741137

Datei anzeigen

@ -40,6 +40,7 @@ public class Region {
private static final List<Region> regions = new ArrayList<>(); private static final List<Region> regions = new ArrayList<>();
private static boolean buildArea = false; private static boolean buildArea = false;
private static boolean extensionArea = false;
static{ static{
YamlConfiguration config = new YamlConfiguration(); YamlConfiguration config = new YamlConfiguration();
@ -66,6 +67,10 @@ public class Region {
return buildArea; return buildArea;
} }
public static boolean extensionAreaEnabled() {
return extensionArea;
}
public static Region getRegion(Location location) { public static Region getRegion(Location location) {
for (Region region : regions) { for (Region region : regions) {
if (region.inRegion(location)) return region; if (region.inRegion(location)) return region;
@ -264,6 +269,9 @@ public class Region {
extensionNegativeZ = config.getInt("extensionNegativeZ", 0); extensionNegativeZ = config.getInt("extensionNegativeZ", 0);
extensionPositiveY = config.getInt("extensionPositiveY", 0); extensionPositiveY = config.getInt("extensionPositiveY", 0);
extensionAxisX = config.getInt("extensionAxisX", 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); rotate = config.getBoolean("rotate", false);
ConfigurationSection testblockSection = config.getConfigurationSection("testblock"); ConfigurationSection testblockSection = config.getConfigurationSection("testblock");