Class GlobalProtectedRegion

java.lang.Object
com.sk89q.worldguard.protection.regions.ProtectedRegion
com.sk89q.worldguard.protection.regions.GlobalProtectedRegion
All Implemented Interfaces:
ChangeTracked, Comparable<ProtectedRegion>

public class GlobalProtectedRegion extends 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.

  • Constructor Details

    • GlobalProtectedRegion

      public GlobalProtectedRegion(String id)
      Create a new instance.
      Equivalent to GlobalProtectedRegion(id, false)
      transientRegion will be set to false, and this region can be saved.
      Parameters:
      id - the ID
    • GlobalProtectedRegion

      public GlobalProtectedRegion(String id, boolean transientRegion)
      Create a new instance.
      Parameters:
      id - the ID
      transientRegion - whether this region should only be kept in memory and not be saved
  • Method Details

    • isPhysicalArea

      public boolean isPhysicalArea()
      Description copied from class: ProtectedRegion
      Return whether this type of region encompasses physical area.
      Specified by:
      isPhysicalArea in class ProtectedRegion
      Returns:
      Whether physical area is encompassed
    • getPoints

      public List<com.sk89q.worldedit.math.BlockVector2> getPoints()
      Description copied from class: ProtectedRegion
      Get points of the region projected onto the X-Z plane.
      Specified by:
      getPoints in class ProtectedRegion
      Returns:
      the points
    • volume

      public int volume()
      Description copied from class: ProtectedRegion
      Get the number of blocks in this region.
      Specified by:
      volume in class ProtectedRegion
      Returns:
      the volume of this region in blocks
    • contains

      public boolean contains(com.sk89q.worldedit.math.BlockVector3 pt)
      Description copied from class: ProtectedRegion
      Check to see if a point is inside this region.
      Specified by:
      contains in class ProtectedRegion
      Parameters:
      pt - The point to check
      Returns:
      Whether pt is in this region
    • getType

      public RegionType getType()
      Description copied from class: ProtectedRegion
      Get the type of region.
      Specified by:
      getType in class ProtectedRegion
      Returns:
      the type
    • getIntersectingRegions

      public List<ProtectedRegion> getIntersectingRegions(Collection<ProtectedRegion> regions)
      Description copied from class: ProtectedRegion
      Return a list of regions from the given list of regions that intersect with this region.
      Overrides:
      getIntersectingRegions in class ProtectedRegion
      Parameters:
      regions - a list of regions to source from
      Returns:
      the elements of regions that intersect with this region