public interface ApplicableRegionSet extends Iterable<ProtectedRegion>
An instance of this can be created using the spatial query methods
available on RegionManager.
| Modifier and Type | Method and Description |
|---|---|
boolean |
allows(StateFlag flag)
Deprecated.
use
queryState(RegionAssociable, StateFlag...) instead |
boolean |
allows(StateFlag flag,
LocalPlayer player)
Deprecated.
use
queryState(RegionAssociable, StateFlag...) instead |
boolean |
canBuild(LocalPlayer player)
Deprecated.
|
boolean |
canConstruct(LocalPlayer player)
Deprecated.
The
CONSTRUCT flag is being removed and is no longer
needed because flags now support groups assigned to them. |
<T extends Flag<V>,V> |
getFlag(T flag)
Deprecated.
Use
queryValue(RegionAssociable, Flag) instead. There
is no difference in functionality. |
<T extends Flag<V>,V> |
getFlag(T flag,
LocalPlayer groupPlayer)
Deprecated.
Use
queryValue(RegionAssociable, Flag) instead. There
is no difference in functionality. |
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> 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. |
forEach, iterator, spliteratorboolean 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.
FailedLoadRegionSet@Deprecated boolean canBuild(LocalPlayer player)
testState(RegionAssociable, StateFlag...)DefaultFlag.BUILD flag or membership
requirements permit the given player.player - the player to checkboolean 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
DefaultFlag.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
DefaultFlag.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
DefaultFlag.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> 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
DefaultFlag.BUILD flag is the flag being queried.
subject - an optional subject, which would be used to determine the region group to applyflag - the flag@Deprecated boolean canConstruct(LocalPlayer player)
CONSTRUCT flag is being removed and is no longer
needed because flags now support groups assigned to them.player - the player@Deprecated boolean allows(StateFlag flag)
queryState(RegionAssociable, StateFlag...) insteadflag - flag to checkIllegalArgumentException - if the build flag is given@Deprecated boolean allows(StateFlag flag, @Nullable LocalPlayer player)
queryState(RegionAssociable, StateFlag...) insteadflag - flag to checkplayer - player (used by some flags)IllegalArgumentException - if the build flag is givenboolean isOwnerOfAll(LocalPlayer player)
player - the playerboolean isMemberOfAll(LocalPlayer player)
player - the player@Deprecated @Nullable <T extends Flag<V>,V> V getFlag(T flag)
queryValue(RegionAssociable, Flag) instead. There
is no difference in functionality.allows(StateFlag, LocalPlayer) for that).flag - the flag to check@Deprecated @Nullable <T extends Flag<V>,V> V getFlag(T flag, @Nullable LocalPlayer groupPlayer)
queryValue(RegionAssociable, Flag) instead. There
is no difference in functionality.allows(StateFlag, LocalPlayer) for that).flag - flag to checkgroupPlayer - player to check RegionGroups againstIllegalArgumentException - if a StateFlag is givenint size()
Set<ProtectedRegion> getRegions()
Copyright © 2015. All Rights Reserved.