This commit is contained in:
Jesse Boyd 2018-04-13 20:37:28 +10:00
parent 7f257e2bf3
commit 4f63cdf560
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -50,12 +50,11 @@ public class WEManager {
}
boolean allowMember = player.hasPermission("plots.worldedit.member");
Plot plot = player.getCurrentPlot();
if (Flags.NO_WORLDEDIT.isTrue(plot)) return regions;
HashSet<RegionWrapper> allowed = new HashSet<>();
if (plot == null) {
plot = player.getMeta("WorldEditRegionPlot");
}
if (plot != null && (!Settings.Done.RESTRICT_BUILDING || !Flags.DONE.isSet(plot)) && ((allowMember && plot.isAdded(uuid)) || (!allowMember && (plot.isOwner(uuid)) || plot.getTrusted().contains(uuid)))) {
if (plot != null && (!Settings.Done.RESTRICT_BUILDING || !Flags.DONE.isSet(plot)) && ((allowMember && plot.isAdded(uuid)) || (!allowMember && (plot.isOwner(uuid)) || plot.getTrusted().contains(uuid))) && !(Flags.NO_WORLDEDIT.isTrue(plot))) {
for (RegionWrapper region : plot.getRegions()) {
RegionWrapper copy = new RegionWrapper(region.minX, region.maxX, area.MIN_BUILD_HEIGHT, area.MAX_BUILD_HEIGHT, region.minZ, region.maxZ);
regions.add(copy);