This commit is contained in:
Jesse Boyd 2016-08-26 01:36:35 +10:00
parent 7d11147836
commit 2806f8b20c

View File

@ -49,13 +49,14 @@ public class WEManager {
return regions; return regions;
} }
boolean allowMember = player.hasPermission("plots.worldedit.member"); boolean allowMember = player.hasPermission("plots.worldedit.member");
for (Plot plot : area.getPlots()) { Plot plot = player.getCurrentPlot();
if (!plot.isBasePlot() || (Settings.Done.RESTRICT_BUILDING && (plot.getFlag(Flags.DONE).isPresent()))) { HashSet<RegionWrapper> allowed = new HashSet<>();
continue; if (plot == null) {
} plot = player.getMeta("WorldEditRegionPlot");
if (allowMember && plot.isAdded(uuid) || !allowMember && (plot.isOwner(uuid) || plot.getTrusted().contains(uuid))) { }
regions.addAll(plot.getRegions()); if (plot != null && (!Settings.Done.RESTRICT_BUILDING || !Flags.DONE.isSet(plot)) && ((allowMember && plot.isAdded(uuid)) || (!allowMember && (plot.isOwner(uuid)) || plot.getTrusted().contains(uuid)))) {
} regions.addAll(plot.getRegions());
player.setMeta("WorldEditRegionPlot", plot);
} }
return regions; return regions;
} }