public interface ApplicableRegionSet extends java.lang.Iterable<ProtectedRegion>
An instance of this can be created using the spatial query methods
available on RegionManager.
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<ProtectedRegion> |
getRegions()
Get an immutable set of regions that are included in this set.
|
boolean |
isMemberOfAll(LocalPlayer player)
Test whether a player is an owner or member of all regions in this set.
|
boolean |
isOwnerOfAll(LocalPlayer player)
Test whether a player is an owner of all regions in this set.
|
boolean |
isVirtual()
Return whether this region set is a virtual set.
|
<V> java.util.Collection<V> |
queryAllValues(RegionAssociable subject,
Flag<V> flag)
Get the effective values for a flag, returning a collection of all
values.
|
StateFlag.State |
queryState(RegionAssociable subject,
StateFlag... flags)
Get the (effective) value for a list of state flags.
|
<V> V |
queryValue(RegionAssociable subject,
Flag<V> flag)
Get the effective value for a flag.
|
int |
size()
Get the number of regions that are included.
|
boolean |
testState(RegionAssociable subject,
StateFlag... flags)
Test whether the (effective) value for a list of state flags equals
ALLOW. |
boolean isVirtual()
A virtual result may be returned if region data failed to load or there was some special exception (i.e. the region bypass permission).
Be sure to check the value of this flag if an instance of this
interface is being retrieved from RegionQuery as it may
return an instance of PermissiveRegionSet or
FailedLoadRegionSet, among other possibilities.
FailedLoadRegionSetboolean testState(@Nullable
RegionAssociable subject,
StateFlag... flags)
ALLOW.
subject can be non-null to satisfy region group requirements,
otherwise it will be assumed that the caller that is not a member of any
regions. (Flags on a region can be changed so that they only apply
to certain users.) The subject argument is required if the
Flags.BUILD flag is in the list of flags.
subject - an optional subject, which would be used to determine the region groups that applyflags - a list of flags to checkALLOWqueryState(RegionAssociable, StateFlag...)@Nullable StateFlag.State queryState(@Nullable RegionAssociable subject, StateFlag... flags)
DENY overrides ALLOW,
and ALLOW overrides NONE. One flag may override another.
subject can be non-null to satisfy region group requirements,
otherwise it will be assumed that the caller that is not a member of any
regions. (Flags on a region can be changed so that they only apply
to certain users.) The subject argument is required if the
Flags.BUILD flag is in the list of flags.
subject - an optional subject, which would be used to determine the region groups that applyflags - a list of flags to check@Nullable
<V> V queryValue(@Nullable
RegionAssociable subject,
Flag<V> flag)
Only some flag types actually have a strategy for picking the
"best value." For most types, the actual value that is chosen to be
returned is undefined (it could be any value). As of writing, the only
type of flag that actually has a strategy for picking a value is the
StateFlag.
subject can be non-null to satisfy region group requirements,
otherwise it will be assumed that the caller that is not a member of any
regions. (Flags on a region can be changed so that they only apply
to certain users.) The subject argument is required if the
Flags.BUILD flag is the flag being queried.
subject - an optional subject, which would be used to determine the region group to applyflag - the flagnull<V> java.util.Collection<V> queryAllValues(@Nullable
RegionAssociable subject,
Flag<V> flag)
subject can be non-null to satisfy region group requirements,
otherwise it will be assumed that the caller that is not a member of any
regions. (Flags on a region can be changed so that they only apply
to certain users.) The subject argument is required if the
Flags.BUILD flag is the flag being queried.
subject - an optional subject, which would be used to determine the region group to applyflag - the flagboolean isOwnerOfAll(LocalPlayer player)
player - the playerboolean isMemberOfAll(LocalPlayer player)
player - the playerint size()
java.util.Set<ProtectedRegion> getRegions()