Class VerticalRepositioning

java.lang.Object
com.ryandw11.structure.structure.properties.schematics.VerticalRepositioning

public class VerticalRepositioning extends Object
The Vertical Repositioning settings of a Sub-Schematic.
  • 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

      @Nullable public @Nullable Pair<Integer,​Integer> getRange()
      Get the range.
      Returns:
      The valid spawning range. (Null if none).
    • getRawSpawnY

      public String 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

      public String getNoPointSolution()
      Get the no-point solution.
      Returns:
      The no point solution.