Class GlobalProtectedRegion
java.lang.Object
com.sk89q.worldguard.protection.regions.ProtectedRegion
com.sk89q.worldguard.protection.regions.GlobalProtectedRegion
- All Implemented Interfaces:
ChangeTracked,Comparable<ProtectedRegion>
A special region that is not quite "anywhere" (its volume is 0, it
contains no positions, and it does not intersect with any other region).
Global regions, however, are used to specify a region with flags that are applied with the lowest priority.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sk89q.worldguard.protection.regions.ProtectedRegion
ProtectedRegion.CircularInheritanceException -
Field Summary
Fields inherited from class com.sk89q.worldguard.protection.regions.ProtectedRegion
GLOBAL_REGION, max, min -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance.
Equivalent toGlobalProtectedRegion(id, false)
transientRegionwill be set to false, and this region can be saved.GlobalProtectedRegion(String id, boolean transientRegion)Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(com.sk89q.worldedit.math.BlockVector3 pt)Check to see if a point is inside this region.getIntersectingRegions(Collection<ProtectedRegion> regions)Return a list of regions from the given list of regions that intersect with this region.List<com.sk89q.worldedit.math.BlockVector2>Get points of the region projected onto the X-Z plane.getType()Get the type of region.booleanReturn whether this type of region encompasses physical area.intvolume()Get the number of blocks in this region.Methods inherited from class com.sk89q.worldguard.protection.regions.ProtectedRegion
clearParent, compareTo, contains, contains, containsAny, copyFrom, getFlag, getFlags, getId, getMaximumPoint, getMembers, getMinimumPoint, getOwners, getParent, getPriority, hashCode, hasMembersOrOwners, intersects, intersectsBoundingBox, intersectsEdges, isDirty, isMember, isMember, isMemberOnly, isOwner, isOwner, isTransient, isValidId, setDirty, setFlag, setFlags, setMembers, setMinMaxPoints, setOwners, setParent, setPriority, toString
-
Constructor Details
-
GlobalProtectedRegion
Create a new instance.
Equivalent toGlobalProtectedRegion(id, false)
transientRegionwill be set to false, and this region can be saved.- Parameters:
id- the ID
-
GlobalProtectedRegion
Create a new instance.- Parameters:
id- the IDtransientRegion- whether this region should only be kept in memory and not be saved
-
-
Method Details
-
isPhysicalArea
public boolean isPhysicalArea()Description copied from class:ProtectedRegionReturn whether this type of region encompasses physical area.- Specified by:
isPhysicalAreain classProtectedRegion- Returns:
- Whether physical area is encompassed
-
getPoints
Description copied from class:ProtectedRegionGet points of the region projected onto the X-Z plane.- Specified by:
getPointsin classProtectedRegion- Returns:
- the points
-
volume
public int volume()Description copied from class:ProtectedRegionGet the number of blocks in this region.- Specified by:
volumein classProtectedRegion- Returns:
- the volume of this region in blocks
-
contains
public boolean contains(com.sk89q.worldedit.math.BlockVector3 pt)Description copied from class:ProtectedRegionCheck to see if a point is inside this region.- Specified by:
containsin classProtectedRegion- Parameters:
pt- The point to check- Returns:
- Whether
ptis in this region
-
getType
Description copied from class:ProtectedRegionGet the type of region.- Specified by:
getTypein classProtectedRegion- Returns:
- the type
-
getIntersectingRegions
Description copied from class:ProtectedRegionReturn a list of regions from the given list of regions that intersect with this region.- Overrides:
getIntersectingRegionsin classProtectedRegion- Parameters:
regions- a list of regions to source from- Returns:
- the elements of
regionsthat intersect with this region
-