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

public class SubSchematic extends Object
This class holds a single SubSchematic (both simple and advanced).
  • Constructor Details

    • SubSchematic

      public SubSchematic(@NotNull @NotNull org.bukkit.configuration.ConfigurationSection section, boolean advanced)
      Create a sub schematic from a configuration section.
      Parameters:
      section - The configuration section.
      advanced - If the sub schematic is under the advanced sub-schematic section.
    • SubSchematic

      public SubSchematic(String file, boolean placeAir, boolean useRotation, int weight, @Nullable @Nullable VerticalRepositioning verticalRepositioning)
      Create a sub schematic.
      Parameters:
      file - The file.

      Note: The plugin does not check to make sure this file is valid!

      placeAir - If the structure should place air.
      useRotation - If you want the structure to use the rotation of the sign.
      weight - The weight of the sub-schematic.
      verticalRepositioning - The verticalRepositioning settings of the subschematic.
  • Method Details

    • setPlaceAir

      public void setPlaceAir(boolean placeAir)
      Set if the sub schematic should place air.
      Parameters:
      placeAir - If the sub schematic should place air.
    • isPlacingAir

      public boolean isPlacingAir()
      Get if the sub schematic should place air.
      Returns:
      If the the sub schematic should place air.
    • setUseRotation

      public void setUseRotation(boolean useRotation)
      Set if the sub schematic should use the rotation of the signs.
      Parameters:
      useRotation - If the sub schematic should use the rotation of the signs.
    • isUsingRotation

      public boolean isUsingRotation()
      Get if the sub schematic is using the rotation of the signs.
      Returns:
      If the sub schematic is using the rotations of the signs.
    • setFile

      public void setFile(String file)
      Set the file of the sub schematic.
      Parameters:
      file - The file of the sub schematic.
    • getFile

      public String getFile()
      Get the file of the sub schematic.
      Returns:
      The file of the sub schematic.
    • getWeight

      public double getWeight()
      The weight for the schematic.

      This is 0 if it belongs to a simple sub-schematic configuration.

      Returns:
      The weight of the schematic.
    • getVerticalRepositioning

      @Nullable public @Nullable VerticalRepositioning getVerticalRepositioning()
      Gets the vertical repositioning settings. (Null if there is no vertical repositioning).
      Returns:
      The vertical repositioning settings.