Merge branch 'master' into CanonSimulator
Dieser Commit ist enthalten in:
Commit
417f4d3965
@ -40,6 +40,7 @@ public class Region {
|
||||
|
||||
private static final List<Region> 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;
|
||||
@ -190,6 +195,14 @@ public class Region {
|
||||
prototype.protect(this, schem);
|
||||
}
|
||||
|
||||
public boolean hasExtensionAreaRegistered() {
|
||||
return prototype.extensionPrototypeArea;
|
||||
}
|
||||
|
||||
public boolean hasTestblockExtensionAreaRegistered() {
|
||||
return prototype.testblock.extensionPrototypeArea;
|
||||
}
|
||||
|
||||
public static class GlobalRegion extends Region {
|
||||
|
||||
private static final GlobalRegion GLOBAL_REGION = new GlobalRegion();
|
||||
@ -226,6 +239,15 @@ public class Region {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasExtensionAreaRegistered() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTestblockExtensionAreaRegistered() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Prototype{
|
||||
@ -243,6 +265,7 @@ public class Region {
|
||||
private final int extensionNegativeZ;
|
||||
private final int extensionPositiveY;
|
||||
private final int extensionAxisX;
|
||||
private final boolean extensionPrototypeArea;
|
||||
|
||||
private final String schematic;
|
||||
private final boolean rotate;
|
||||
@ -264,6 +287,10 @@ 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;
|
||||
}
|
||||
extensionPrototypeArea = extensionNegativeZ != 0 || extensionPositiveZ != 0 || extensionPositiveY != 0 || extensionAxisX != 0;
|
||||
rotate = config.getBoolean("rotate", false);
|
||||
|
||||
ConfigurationSection testblockSection = config.getConfigurationSection("testblock");
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren