mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
fix: disallowed regions can be length 0 (#2368)
This commit is contained in:
parent
8b39e41a1a
commit
d42854845a
@ -607,21 +607,18 @@ public final class EditSessionBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
FaweRegionExtent regionExtent = null;
|
FaweRegionExtent regionExtent = null;
|
||||||
if (disallowedRegions != null) { // Always use MultiRegionExtent if we have blacklist regions
|
// Always use MultiRegionExtent if we have blacklist regions
|
||||||
|
if (allowedRegions != null && allowedRegions.length == 0) {
|
||||||
|
regionExtent = new NullExtent(this.extent, FaweCache.NO_REGION);
|
||||||
|
} else if (disallowedRegions != null && disallowedRegions.length != 0) {
|
||||||
regionExtent = new MultiRegionExtent(this.extent, this.limit, allowedRegions, disallowedRegions);
|
regionExtent = new MultiRegionExtent(this.extent, this.limit, allowedRegions, disallowedRegions);
|
||||||
} else if (allowedRegions == null) {
|
} else if (allowedRegions == null) {
|
||||||
allowedRegions = new Region[]{RegionWrapper.GLOBAL()};
|
allowedRegions = new Region[]{RegionWrapper.GLOBAL()};
|
||||||
} else {
|
} else if (allowedRegions.length == 1) {
|
||||||
if (allowedRegions.length == 0) {
|
|
||||||
regionExtent = new NullExtent(this.extent, FaweCache.NO_REGION);
|
|
||||||
} else {
|
|
||||||
if (allowedRegions.length == 1) {
|
|
||||||
regionExtent = new SingleRegionExtent(this.extent, this.limit, allowedRegions[0]);
|
regionExtent = new SingleRegionExtent(this.extent, this.limit, allowedRegions[0]);
|
||||||
} else {
|
} else {
|
||||||
regionExtent = new MultiRegionExtent(this.extent, this.limit, allowedRegions, null);
|
regionExtent = new MultiRegionExtent(this.extent, this.limit, allowedRegions, null);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
if (regionExtent != null) {
|
if (regionExtent != null) {
|
||||||
if (placeChunks) {
|
if (placeChunks) {
|
||||||
queue.addProcessor(regionExtent);
|
queue.addProcessor(regionExtent);
|
||||||
|
Loading…
Reference in New Issue
Block a user