Slight cleanup of region parsing in EditSessionBuilder

This commit is contained in:
dordsor21 2021-10-25 14:13:26 +01:00
parent f7e94fd450
commit 47f25c4f31
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -536,7 +536,7 @@ public final class EditSessionBuilder {
}
}
}
if (allowedRegions == null) {
if (allowedRegions == null && Settings.IMP.REGION_RESTRICTIONS) {
if (actor != null && !actor.hasPermission("fawe.bypass") && !actor.hasPermission("fawe.bypass.regions")) {
if (actor instanceof Player) {
Player player = (Player) actor;
@ -564,7 +564,7 @@ public final class EditSessionBuilder {
if (allowedRegions.length == 1) {
regionExtent = new SingleRegionExtent(this.extent, this.limit, allowedRegions[0]);
} else {
regionExtent = new MultiRegionExtent(this.extent, this.limit, allowedRegions, disallowedRegions);
regionExtent = new MultiRegionExtent(this.extent, this.limit, allowedRegions, null);
}
}
}