Class ProtectedPolygonalRegion
java.lang.Object
com.sk89q.worldguard.protection.regions.ProtectedRegion
com.sk89q.worldguard.protection.regions.ProtectedPolygonalRegion
- All Implemented Interfaces:
ChangeTracked
,Comparable<ProtectedRegion>
-
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
ConstructorsConstructorDescriptionProtectedPolygonalRegion
(String id, boolean transientRegion, List<com.sk89q.worldedit.math.BlockVector2> points, int minY, int maxY) Construct a new instance of this polygonal region.ProtectedPolygonalRegion
(String id, List<com.sk89q.worldedit.math.BlockVector2> points, int minY, int maxY) Construct a new instance of this polygonal region.
Equivalent toProtectedPolygonalRegion(id, false, points, minY, maxY)
transientRegion
will be set to false, and this region can be saved. -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(com.sk89q.worldedit.math.BlockVector3 position) Check to see if a point is inside 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.boolean
Return whether this type of region encompasses physical area.int
volume()
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, getIntersectingRegions, 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
-
ProtectedPolygonalRegion
public ProtectedPolygonalRegion(String id, List<com.sk89q.worldedit.math.BlockVector2> points, int minY, int maxY) Construct a new instance of this polygonal region.
Equivalent toProtectedPolygonalRegion(id, false, points, minY, maxY)
transientRegion
will be set to false, and this region can be saved.- Parameters:
id
- the region idpoints
- aList
of points that this region should containminY
- the minimum y coordinatemaxY
- the maximum y coordinate
-
ProtectedPolygonalRegion
public ProtectedPolygonalRegion(String id, boolean transientRegion, List<com.sk89q.worldedit.math.BlockVector2> points, int minY, int maxY) Construct a new instance of this polygonal region.- Parameters:
id
- the region idtransientRegion
- whether this region should only be kept in memory and not be savedpoints
- aList
of points that this region should containminY
- the minimum y coordinatemaxY
- the maximum y coordinate
-
-
Method Details
-
isPhysicalArea
public boolean isPhysicalArea()Description copied from class:ProtectedRegion
Return whether this type of region encompasses physical area.- Specified by:
isPhysicalArea
in classProtectedRegion
- Returns:
- Whether physical area is encompassed
-
getPoints
Description copied from class:ProtectedRegion
Get points of the region projected onto the X-Z plane.- Specified by:
getPoints
in classProtectedRegion
- Returns:
- the points
-
contains
public boolean contains(com.sk89q.worldedit.math.BlockVector3 position) Description copied from class:ProtectedRegion
Check to see if a point is inside this region.- Specified by:
contains
in classProtectedRegion
- Parameters:
position
- The point to check- Returns:
- Whether
pt
is in this region
-
getType
Description copied from class:ProtectedRegion
Get the type of region.- Specified by:
getType
in classProtectedRegion
- Returns:
- the type
-
volume
public int volume()Description copied from class:ProtectedRegion
Get the number of blocks in this region.- Specified by:
volume
in classProtectedRegion
- Returns:
- the volume of this region in blocks
-