Package com.sk89q.worldguard.protection
Class AbstractRegionSet
java.lang.Object
com.sk89q.worldguard.protection.AbstractRegionSet
- All Implemented Interfaces:
ApplicableRegionSet
,Iterable<ProtectedRegion>
- Direct Known Subclasses:
FailedLoadRegionSet
,PermissiveRegionSet
,RegionResultSet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionqueryState
(RegionAssociable subject, StateFlag... flags) Get the (effective) value for a list of state flags.boolean
testState
(RegionAssociable subject, StateFlag... flags) Test whether the (effective) value for a list of state flags equalsALLOW
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sk89q.worldguard.protection.ApplicableRegionSet
getRegions, isMemberOfAll, isOwnerOfAll, isVirtual, queryAllValues, queryMapValue, queryMapValue, queryValue, size
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Constructor Details
-
AbstractRegionSet
public AbstractRegionSet()
-
-
Method Details
-
testState
Description copied from interface:ApplicableRegionSet
Test whether the (effective) value for a list of state flags equalsALLOW
.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 theFlags.BUILD
flag is in the list of flags.- Specified by:
testState
in interfaceApplicableRegionSet
- Parameters:
subject
- an optional subject, which would be used to determine the region groups that applyflags
- a list of flags to check- Returns:
- true if the result was
ALLOW
- See Also:
-
queryState
Description copied from interface:ApplicableRegionSet
Get the (effective) value for a list of state flags. The rules of states is observed here; that is,DENY
overridesALLOW
, andALLOW
overridesNONE
. 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 theFlags.BUILD
flag is in the list of flags.- Specified by:
queryState
in interfaceApplicableRegionSet
- Parameters:
subject
- an optional subject, which would be used to determine the region groups that applyflags
- a list of flags to check- Returns:
- a state
-