Class StructuresSection<T extends IConfigSectionResult>
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.config.ConfigSection<T>
nl.pim16aap2.animatedarchitecture.core.config.StructuresSection<T>
- Type Parameters:
T- the type of result this section produces.
- Direct Known Subclasses:
StructuresSectionSpigot
Represents a section in the configuration with per-structure type settings.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.spongepowered.configurate.CommentedConfigurationNodeBuilds the initial limits node for this configuration section.protected abstract IStructureSubSectioncreateSubSection(StructureType structureType) Creates a subsection for the given structure type.protected abstract Collection<StructureType> Gets the registered structure types.protected StringReturns the comment for this section.Returns the title of the configuration section.final voidpopulateDynamicData(org.spongepowered.configurate.CommentedConfigurationNode root) Populates the structures section with the registered structure types.Methods inherited from class ConfigSection
applyResults, formatDefaultCollection, getResult, getResultConsumer, getSection
-
Field Details
-
SECTION_TITLE
- See Also:
-
-
Constructor Details
-
StructuresSection
public StructuresSection()
-
-
Method Details
-
getSectionComment
Returns the comment for this section.This comment is used to describe the purpose and settings of the section in the configuration file.
Subclasses can override this method to customize the comment for their specific section.
- Returns:
- The comment for this section.
-
buildInitialLimitsNode
public org.spongepowered.configurate.CommentedConfigurationNode buildInitialLimitsNode() throws org.spongepowered.configurate.serialize.SerializationExceptionDescription copied from class:ConfigSectionBuilds the initial limits node for this configuration section.This method is responsible for creating the initial configuration node for this section, including any default values and comments.
- Specified by:
buildInitialLimitsNodein classConfigSection<T extends IConfigSectionResult>- Returns:
- the initial limits node for this section
- Throws:
org.spongepowered.configurate.serialize.SerializationException- if an error occurs during serialization
-
createSubSection
Creates a subsection for the given structure type.- Parameters:
structureType- The structure type to create a subsection for.- Returns:
- An instance of
IStructureSubSectionfor the given structure type.
-
getRegisteredStructureTypes
Gets the registered structure types.- Returns:
- A collection of registered structure types.
-
populateDynamicData
public final void populateDynamicData(org.spongepowered.configurate.CommentedConfigurationNode root) Populates the structures section with the registered structure types.- Overrides:
populateDynamicDatain classConfigSection<T extends IConfigSectionResult>- Parameters:
root- The root configuration node to populate.
-
getSectionTitle
Description copied from class:ConfigSectionReturns the title of the configuration section.- Specified by:
getSectionTitlein classConfigSection<T extends IConfigSectionResult>- Returns:
- the title of the section
-