java.lang.Object
dev.strwbry.eventhorizon.events.utility.fawe.region.GenericRegion
Direct Known Subclasses:
GenericCuboidRegion, GenericCylindricalRegion

public abstract class GenericRegion extends Object
An abstract base class for defining regions in WorldEdit operations. This class provides common functionality for creating and managing different types of regions.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Collection<com.sk89q.worldedit.world.block.BlockType>
    Collection of block types that can be replaced in this region
    protected int
    The height of the region
    protected int
    The vertical offset from the center point
    protected int
    The radius of the region
    protected String
    The block type ID to use for replacements
  • Constructor Summary

    Constructors
    Constructor
    Description
    GenericRegion(int radius, int height, int heightOffset)
    Constructs a new region with specified dimensions.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract com.sk89q.worldedit.regions.AbstractRegion
    createRegion(com.sk89q.worldedit.world.World world, com.sk89q.worldedit.math.BlockVector3 center)
    Creates a specific region implementation around a center point.
    com.sk89q.worldedit.regions.AbstractRegion
    getRegion(org.bukkit.entity.Player player)
    Creates a region centered on a player's location.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • radius

      protected int radius
      The radius of the region
    • height

      protected int height
      The height of the region
    • heightOffset

      protected int heightOffset
      The vertical offset from the center point
    • replacementBlockId

      protected String replacementBlockId
      The block type ID to use for replacements
    • blockTypesToReplace

      protected Collection<com.sk89q.worldedit.world.block.BlockType> blockTypesToReplace
      Collection of block types that can be replaced in this region
  • Constructor Details

    • GenericRegion

      public GenericRegion(int radius, int height, int heightOffset)
      Constructs a new region with specified dimensions.
      Parameters:
      radius - The radius of the region
      height - The height of the region
      heightOffset - The vertical offset from the center point
  • Method Details

    • createRegion

      protected abstract com.sk89q.worldedit.regions.AbstractRegion createRegion(com.sk89q.worldedit.world.World world, com.sk89q.worldedit.math.BlockVector3 center)
      Creates a specific region implementation around a center point.
      Parameters:
      world - The world in which to create the region
      center - The center point of the region
      Returns:
      An AbstractRegion representing the specific region implementation
    • getRegion

      public com.sk89q.worldedit.regions.AbstractRegion getRegion(org.bukkit.entity.Player player)
      Creates a region centered on a player's location.
      Parameters:
      player - The player whose location will be used as the center of the region
      Returns:
      An AbstractRegion centered on the player's location