Class SubSchematics
java.lang.Object
com.ryandw11.structure.structure.properties.SubSchematics
The simple SubSchematic feature.
-
Constructor Summary
ConstructorDescriptionSubSchematics(boolean enabled)
Construct the SubSchematic feature programmatically.SubSchematics(@NotNull org.bukkit.configuration.file.FileConfiguration configuration, @NotNull CustomStructures plugin)
Get the sub schematics from a configuration file. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSchematic(SubSchematic subSchematic)
Add a SubSchematic to the list.Get the list of sub schematics.boolean
If sub schematics are enabled.void
setEnabled(boolean enabled)
Only enable this via code if you are certain the formatting is right with the schematic list.void
setSchematics(List<SubSchematic> schematics)
Set the list of sub schematics.
-
Constructor Details
-
SubSchematics
public SubSchematics(@NotNull @NotNull org.bukkit.configuration.file.FileConfiguration configuration, @NotNull @NotNull CustomStructures plugin)Get the sub schematics from a configuration file.- Parameters:
configuration
- The configuration file.plugin
- The instance of custom structures. (CustomStructures.getInstance()).
-
SubSchematics
public SubSchematics(boolean enabled)Construct the SubSchematic feature programmatically.- Parameters:
enabled
- If this feature should be enabled.
-
-
Method Details
-
isEnabled
public boolean isEnabled()If sub schematics are enabled.Automatically enabled if the ConfigurationSection exists.
- Returns:
- If sub schematics are enabled.
-
setEnabled
public void setEnabled(boolean enabled)Only enable this via code if you are certain the formatting is right with the schematic list. The plugin does no additional checks after the construction of the object.- Parameters:
enabled
- If you want the feature to be enabled.
-
getSchematics
Get the list of sub schematics.- Returns:
- The list of sub schematics.
-
setSchematics
Set the list of sub schematics.- Parameters:
schematics
- The list of sub schematics.
-
addSchematic
Add a SubSchematic to the list.- Parameters:
subSchematic
- The sub-schematic to add.
-