/** * Create a new instance using a list of regions that is known to * already be sorted by priority descending. * * @param regions a list of regions * @param globalRegion a global region * @return an instance */ public static RegionResultSet fromSortedList(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion) { return new RegionResultSet(regions, globalRegion, true); }
public ApplicableRegionSet getApplicableSet() { return new RegionResultSet(regions, global); }
public ApplicableRegionSet getApplicableSetInWilderness() { return new RegionResultSet(Collections.<ProtectedRegion>emptyList(), global); }
/** * Query for effective flags and owners for the given positive. * * @param position the position * @return the query object */ public ApplicableRegionSet getApplicableRegions(BlockVector3 position) { checkNotNull(position); Set<ProtectedRegion> regions = Sets.newHashSet(); index.applyContaining(position, new RegionCollectionConsumer(regions, true)); return new RegionResultSet(regions, index.get("__global__")); }
/** * Query for effective flags and owners for the area represented * by the given region. * * @param region the region * @return the query object */ public ApplicableRegionSet getApplicableRegions(ProtectedRegion region) { checkNotNull(region); Set<ProtectedRegion> regions = Sets.newHashSet(); index.applyIntersecting(region, new RegionCollectionConsumer(regions, true)); return new RegionResultSet(regions, index.get("__global__")); }