Interface IArea

All Known Implementing Classes:
AbstractYLimitedArea, EllipseArea, GlobalYLimitedArea, RectangleArea

public interface IArea
Defines the contract for area-related operations within the world. Implementations of this interface should provide mechanisms for determining area boundaries, locating chunks within these boundaries, and managing world-related properties.
Since:
2023-03-30
Version:
1.0.0
Author:
notzune
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.Location
    Provides the central point of this area, which can be used as an anchor for various operations.
    Collection<org.bukkit.Chunk>
    Retrieves a collection of all chunks that are within or intersect the boundaries of this area.
    Retrieves a collection of all pseudo chunk coordinates that are within or intersect the boundaries of this area.
    org.bukkit.World
    Retrieves the world where this area exists.
    boolean
    isInArea(org.bukkit.Location loc)
    Determines whether a specific location falls within the boundaries of this area.
  • Method Details

    • isInArea

      boolean isInArea(org.bukkit.Location loc)
      Determines whether a specific location falls within the boundaries of this area.
      Parameters:
      loc - The location to check.
      Returns:
      True if the location is within the boundaries of the area, false otherwise.
    • getChunks

      Collection<org.bukkit.Chunk> getChunks()
      Retrieves a collection of all chunks that are within or intersect the boundaries of this area. For areas of infinite size, this method may return null.
      Returns:
      A collection of Chunk instances representing the chunks within this area, or null if the area has an infinite extent.
    • getPseudoChunks

      Collection<PseudoChunk> getPseudoChunks()
      Retrieves a collection of all pseudo chunk coordinates that are within or intersect the boundaries of this area. This method provides a lightweight alternative to getChunks() by avoiding actual chunk loading. For areas of infinite size, this method may return null.
      Returns:
      A collection of PseudoChunk instances representing the chunk coordinates within this area, or null if the area has an infinite extent.
    • getCenter

      org.bukkit.Location getCenter()
      Provides the central point of this area, which can be used as an anchor for various operations.
      Returns:
      The central Location of the area.
    • getWorld

      org.bukkit.World getWorld()
      Retrieves the world where this area exists.
      Returns:
      The World instance associated with this area.