Class StructuresSectionSpigot
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.config.ConfigSection<StructuresSectionSpigot.Result>
nl.pim16aap2.animatedarchitecture.core.config.StructuresSection<StructuresSectionSpigot.Result>
nl.pim16aap2.animatedarchitecture.spigot.core.config.StructuresSectionSpigot
Spigot-specific implementation of the StructuresSection.
This class extends the StructuresSection to provide additional comments and configurations specific to the Spigot platform.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents the result of the StructuresSection configuration.static final recordRepresents the result of a specific structure configuration. -
Field Summary
Fields inherited from class StructuresSection
SECTION_TITLE -
Constructor Summary
ConstructorsConstructorDescriptionStructuresSectionSpigot(dagger.Lazy<StructureTypeManager> lazyStructureTypeManager, @Nullable Consumer<StructuresSectionSpigot.Result> resultConsumer) -
Method Summary
Modifier and TypeMethodDescriptionprotected IStructureSubSectioncreateSubSection(StructureType structureType) Creates a subsection for the given structure type.protected Collection<StructureType> Gets the registered structure types.protected StructuresSectionSpigot.ResultgetResult(org.spongepowered.configurate.ConfigurationNode sectionNode, boolean silent) Gets the result of this configuration section.@Nullable Consumer<StructuresSectionSpigot.Result> Gets the consumer that will handle the result of this configuration section.protected StringReturns the comment for this section.Methods inherited from class StructuresSection
buildInitialLimitsNode, getSectionTitle, populateDynamicDataMethods inherited from class ConfigSection
applyResults, formatDefaultCollection, getSection
-
Constructor Details
-
StructuresSectionSpigot
public StructuresSectionSpigot(dagger.Lazy<StructureTypeManager> lazyStructureTypeManager, @Nullable Consumer<StructuresSectionSpigot.Result> resultConsumer) -
StructuresSectionSpigot
public StructuresSectionSpigot()
-
-
Method Details
-
getSectionComment
Description copied from class:StructuresSectionReturns 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.
- Overrides:
getSectionCommentin classStructuresSection<StructuresSectionSpigot.Result>- Returns:
- The comment for this section.
-
createSubSection
Description copied from class:StructuresSectionCreates a subsection for the given structure type.- Specified by:
createSubSectionin classStructuresSection<StructuresSectionSpigot.Result>- Parameters:
structureType- The structure type to create a subsection for.- Returns:
- An instance of
IStructureSubSectionfor the given structure type.
-
getRegisteredStructureTypes
Description copied from class:StructuresSectionGets the registered structure types.- Specified by:
getRegisteredStructureTypesin classStructuresSection<StructuresSectionSpigot.Result>- Returns:
- A collection of registered structure types.
-
getResult
protected StructuresSectionSpigot.Result getResult(org.spongepowered.configurate.ConfigurationNode sectionNode, boolean silent) Description copied from class:ConfigSectionGets the result of this configuration section.- Specified by:
getResultin classConfigSection<StructuresSectionSpigot.Result>- Parameters:
sectionNode- The configuration node for this section.silent- When true, the method will not log any informational/status messages when parsing the results.- Returns:
- the result of this configuration section
-
getResultConsumer
Description copied from class:ConfigSectionGets the consumer that will handle the result of this configuration section.- Specified by:
getResultConsumerin classConfigSection<StructuresSectionSpigot.Result>- Returns:
- the consumer that will handle the result, or null if no consumer is defined.
-