Package tk.airshipcraft.commonlib.world
Class AbstractYLimitedArea
java.lang.Object
tk.airshipcraft.commonlib.world.AbstractYLimitedArea
- All Implemented Interfaces:
- IArea
- Direct Known Subclasses:
- EllipseArea,- GlobalYLimitedArea,- RectangleArea
An abstract implementation of a Y-limited area. This class provides a basic structure
 for areas that are bounded vertically between two Y levels. It can be extended to create
 specific area types with additional constraints on the X and Z axes.
- Since:
- 2023-04-01
- Version:
- 1.0.0
- Author:
- notzune
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractYLimitedArea(double lowerYBound, double upperYBound) Constructs anAbstractYLimitedAreawith specified lower and upper Y bounds.
- 
Method SummaryModifier and TypeMethodDescriptiondoubleRetrieves the lower Y boundary of the area.doubleRetrieves the upper Y boundary of the area.booleanisInArea(org.bukkit.Location loc) Determines whether a given location falls within the vertical bounds of the area.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tk.airshipcraft.commonlib.world.IAreagetCenter, getChunks, getPseudoChunks, getWorld
- 
Constructor Details- 
AbstractYLimitedAreapublic AbstractYLimitedArea(double lowerYBound, double upperYBound) Constructs anAbstractYLimitedAreawith specified lower and upper Y bounds.- Parameters:
- lowerYBound- The minimum Y value that is considered part of the area.
- upperYBound- The maximum Y value that is considered part of the area.
- Throws:
- IllegalArgumentException- If the lowerYBound is greater than the upperYBound.
 
 
- 
- 
Method Details- 
isInAreapublic boolean isInArea(org.bukkit.Location loc) Determines whether a given location falls within the vertical bounds of the area.
- 
getLowerYBoundpublic double getLowerYBound()Retrieves the lower Y boundary of the area.- Returns:
- The minimum Y value included in the area.
 
- 
getUpperYBoundpublic double getUpperYBound()Retrieves the upper Y boundary of the area.- Returns:
- The maximum Y value included in the area.
 
 
-