Class YamlHandler
java.lang.Object
com.kamikazejam.kamicommon.yaml.AbstractYamlHandler<YamlConfiguration>
com.kamikazejam.kamicommon.yaml.spigot.YamlHandler
-
Nested Class Summary
Nested classes/interfaces inherited from class com.kamikazejam.kamicommon.yaml.AbstractYamlHandler
AbstractYamlHandler.NodePair
-
Field Summary
Fields inherited from class com.kamikazejam.kamicommon.yaml.AbstractYamlHandler
abstractConfig, config, configFile, defaultsStream, fileName
-
Constructor Summary
ConstructorsConstructorDescriptionYamlHandler
(@NotNull AbstractConfig<?> abstractConfig, @NotNull LoggerService logger, @NotNull File configFile, @Nullable Supplier<InputStream> defaultsStream) -
Method Summary
Modifier and TypeMethodDescriptionvoid
newMemorySection
(org.yaml.snakeyaml.nodes.MappingNode node) void
Methods inherited from class com.kamikazejam.kamicommon.yaml.AbstractYamlHandler
copyCommentsFromDefault, createNewMappingNode, loadConfig
-
Constructor Details
-
YamlHandler
public YamlHandler(@NotNull @NotNull AbstractConfig<?> abstractConfig, @NotNull @NotNull LoggerService logger, @NotNull @NotNull File configFile, @Nullable @Nullable Supplier<InputStream> defaultsStream) - Parameters:
abstractConfig
- The parent config instance who holds this handler.logger
- The logger service for warnings and errors.configFile
- The file to read/write the configuration to/from.defaultsStream
- An optional stream (of a YAML config) to read default values from, can be null.
-
-
Method Details
-
error
- Specified by:
error
in classAbstractYamlHandler<YamlConfiguration>
-
warn
- Specified by:
warn
in classAbstractYamlHandler<YamlConfiguration>
-
newConfig
- Specified by:
newConfig
in classAbstractYamlHandler<YamlConfiguration>
-
newMemorySection
- Specified by:
newMemorySection
in classAbstractYamlHandler<YamlConfiguration>
-