Class VerticalRepositioning
java.lang.Object
com.ryandw11.structure.structure.properties.schematics.VerticalRepositioning
The Vertical Repositioning settings of a Sub-Schematic.
-
Constructor Summary
ConstructorDescriptionVerticalRepositioning(String range, String spawnY, org.bukkit.HeightMap heightMap, String noPointSolution)
Create the vertical repositioning settings.VerticalRepositioning(String sectionName, org.bukkit.configuration.ConfigurationSection section)
Construct the settings from a configuration file. -
Method Summary
-
Constructor Details
-
VerticalRepositioning
public VerticalRepositioning(String sectionName, org.bukkit.configuration.ConfigurationSection section)Construct the settings from a configuration file.- Parameters:
sectionName
- The name of the section.section
- The configuration section.
-
VerticalRepositioning
public VerticalRepositioning(String range, String spawnY, org.bukkit.HeightMap heightMap, String noPointSolution)Create the vertical repositioning settings.- Parameters:
range
- The range that the schematic can spawn in. (ex: [-10; 20]).spawnY
- The SpawnY setting for the vertical repositioning.heightMap
- The height map to pick the top block from.noPointSolution
- What to do when the SpawnY selected is out of the range. (CURRENT, PREVENT_SPAWN, Stylized SpawnY Int (without top)).
-
-
Method Details
-
getRange
Get the range.- Returns:
- The valid spawning range. (Null if none).
-
getRawSpawnY
Get the raw SpawnY value.- Returns:
- The raw SpawnY Value.
-
getSpawnY
public int getSpawnY(@Nullable @Nullable org.bukkit.Location location)Get the processed SpawnY value.- Parameters:
location
- The location of the top block (if there is one).- Returns:
- The location.
-
getSpawnYHeightMap
public org.bukkit.HeightMap getSpawnYHeightMap()Get the Height Map to use.- Returns:
- The height map to use.
-
getNoPointSolution
Get the no-point solution.- Returns:
- The no point solution.
-