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.booleantestState(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, waitMethods inherited from interface com.sk89q.worldguard.protection.ApplicableRegionSet
getRegions, isMemberOfAll, isOwnerOfAll, isVirtual, queryAllValues, queryMapValue, queryMapValue, queryValue, sizeMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Constructor Details
-
AbstractRegionSet
public AbstractRegionSet()
-
-
Method Details
-
testState
Description copied from interface:ApplicableRegionSetTest whether the (effective) value for a list of state flags equalsALLOW.subjectcan 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.BUILDflag is in the list of flags.- Specified by:
testStatein 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:
ApplicableRegionSet.queryState(RegionAssociable, StateFlag...)
-
queryState
@Nullable public StateFlag.State queryState(@Nullable RegionAssociable subject, StateFlag... flags)Description copied from interface:ApplicableRegionSetGet the (effective) value for a list of state flags. The rules of states is observed here; that is,DENYoverridesALLOW, andALLOWoverridesNONE. One flag may override another.subjectcan 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.BUILDflag is in the list of flags.- Specified by:
queryStatein 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
-