Class BottomSpaceFill
java.lang.Object
com.ryandw11.structure.structure.properties.BottomSpaceFill
Represents the BottomSpaceFill configuration section.
This option allows for the structure to have blocks placed under it when a portion is floating.
-
Constructor Summary
ConstructorDescriptionConstruct a bottom space fill configuration that is disabled.BottomSpaceFill(@Nullable org.bukkit.Material defaultMaterial, @NotNull Map<org.bukkit.block.Biome,org.bukkit.Material> blockFillMap)
Construct a bottom space fill configuration with the desired value.BottomSpaceFill(org.bukkit.configuration.file.FileConfiguration configuration)
Used by the StructureBuilder when there is a structure configuration file. -
Method Summary
Modifier and TypeMethodDescriptionOptional<org.bukkit.Material>
The fill material for any biome not explicitly stated.@NotNull Map<org.bukkit.block.Biome,org.bukkit.Material>
Get the fill block map.Optional<org.bukkit.Material>
getFillMaterial(org.bukkit.block.Biome biome)
Get the fill material for a specific biome.boolean
Check if the structure has bottom space filling enabled.void
setDefaultFillMaterial(@Nullable org.bukkit.Material material)
Set the fill material for any biome not explicitly stated.
-
Constructor Details
-
BottomSpaceFill
public BottomSpaceFill(org.bukkit.configuration.file.FileConfiguration configuration)Used by the StructureBuilder when there is a structure configuration file.- Parameters:
configuration
- The file configuration for the structure config.
-
BottomSpaceFill
public BottomSpaceFill()Construct a bottom space fill configuration that is disabled.You should use this if you don't want your structures to have bottom filling.
-
BottomSpaceFill
public BottomSpaceFill(@Nullable @Nullable org.bukkit.Material defaultMaterial, @NotNull @NotNull Map<org.bukkit.block.Biome,org.bukkit.Material> blockFillMap)Construct a bottom space fill configuration with the desired value.- Parameters:
defaultMaterial
- The default material to be used if a biome is not specified. (Null if you don't want any).blockFillMap
- The block fill map for the structure.
-
-
Method Details
-
isEnabled
public boolean isEnabled()Check if the structure has bottom space filling enabled.- Returns:
- If the structure has bottom space filling enabled.
-
setDefaultFillMaterial
public void setDefaultFillMaterial(@Nullable @Nullable org.bukkit.Material material)Set the fill material for any biome not explicitly stated. (If null, then no fill is performed for non-specified biomes).- Parameters:
material
- The material to use for the fill.
-
getDefaultFillMaterial
The fill material for any biome not explicitly stated. (If none, then no fill is performed for non-specified biomes).- Returns:
- The fill material for any biome not explicitly stated.
-
getFillBlockMap
Get the fill block map.- Returns:
- The fill block map.
-
getFillMaterial
Get the fill material for a specific biome.- Parameters:
biome
- The biome to get the fill material for.- Returns:
- An optional containing the Material. (If none, then no fill exists for that biome).
-