Class SubSchematic
java.lang.Object
com.ryandw11.structure.structure.properties.schematics.SubSchematic
This class holds a single SubSchematic (both simple and advanced).
-
Constructor Summary
ConstructorDescriptionSubSchematic(@NotNull org.bukkit.configuration.ConfigurationSection section, boolean advanced)
Create a sub schematic from a configuration section.SubSchematic(String file, boolean placeAir, boolean useRotation, int weight, @Nullable VerticalRepositioning verticalRepositioning)
Create a sub schematic. -
Method Summary
Modifier and TypeMethodDescriptiongetFile()
Get the file of the sub schematic.@Nullable VerticalRepositioning
Gets the vertical repositioning settings.double
The weight for the schematic.boolean
Get if the sub schematic should place air.boolean
Get if the sub schematic is using the rotation of the signs.void
Set the file of the sub schematic.void
setPlaceAir(boolean placeAir)
Set if the sub schematic should place air.void
setUseRotation(boolean useRotation)
Set if the sub schematic should use the rotation of the signs.
-
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
Set the file of the sub schematic.- Parameters:
file
- The file of the sub schematic.
-
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
Gets the vertical repositioning settings. (Null if there is no vertical repositioning).- Returns:
- The vertical repositioning settings.
-