Class SubSchematics

java.lang.Object
com.ryandw11.structure.structure.properties.SubSchematics

public class SubSchematics extends Object
The simple SubSchematic feature.
  • 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

      public List<SubSchematic> getSchematics()
      Get the list of sub schematics.
      Returns:
      The list of sub schematics.
    • setSchematics

      public void setSchematics(List<SubSchematic> schematics)
      Set the list of sub schematics.
      Parameters:
      schematics - The list of sub schematics.
    • addSchematic

      public void addSchematic(SubSchematic subSchematic)
      Add a SubSchematic to the list.
      Parameters:
      subSchematic - The sub-schematic to add.