public class PermissiveRegionSet extends AbstractRegionSet
| Modifier and Type | Method and Description |
|---|---|
static PermissiveRegionSet |
getInstance()
Get an instance.
|
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.
|
java.util.Iterator<ProtectedRegion> |
iterator() |
<V> java.util.Collection<V> |
queryAllValues(RegionAssociable subject,
Flag<V> flag)
Get the effective values for a flag, returning a collection of all
values.
|
<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.
|
queryState, testStatepublic boolean isVirtual()
ApplicableRegionSetA 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.
FailedLoadRegionSet@Nullable
public <V> V queryValue(@Nullable
RegionAssociable subject,
Flag<V> flag)
ApplicableRegionSetOnly 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. (FlagUtil 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 flagnullpublic <V> java.util.Collection<V> queryAllValues(@Nullable
RegionAssociable subject,
Flag<V> flag)
ApplicableRegionSetsubject 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. (FlagUtil 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 flagpublic boolean isOwnerOfAll(LocalPlayer player)
ApplicableRegionSetplayer - the playerpublic boolean isMemberOfAll(LocalPlayer player)
ApplicableRegionSetplayer - the playerpublic int size()
ApplicableRegionSetpublic java.util.Set<ProtectedRegion> getRegions()
ApplicableRegionSetpublic java.util.Iterator<ProtectedRegion> iterator()
public static PermissiveRegionSet getInstance()