Class ConfigurateConfig
java.lang.Object
me.hsgamer.hscore.config.configurate.ConfigurateConfig
- All Implemented Interfaces:
Config
The
Config
implementation for Configurate-
Field Summary
-
Constructor Summary
ConstructorDescriptionConfigurateConfig
(File file, org.spongepowered.configurate.loader.AbstractConfigurationLoader.Builder<?, ?> builder) Create a new config -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Remove all paths from the configurationGet the value from the pathgetComment
(CommentType type, String... path) Get the comment.getName()
Get the name of the configurationGet the original instanceGet all values from the pathboolean
isNormalizable
(Object object) Check if the object is normalizableNormalize the library-specific objectvoid
reload()
Reload the configurationvoid
save()
Save the configurationvoid
Set the value to the pathvoid
setComment
(CommentType type, List<String> value, String... path) Set the comment This is a default empty method.void
setup()
Set up the configurationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface me.hsgamer.hscore.config.Config
contains, get, getComment, getInstance, getInstance, getKeys, getNormalized, getNormalized, getNormalizedValues, isInstance, normalizeObject, remove, setComment, setIfAbsent, setIfAbsent
-
Constructor Details
-
ConfigurateConfig
public ConfigurateConfig(File file, org.spongepowered.configurate.loader.AbstractConfigurationLoader.Builder<?, ?> builder) Create a new config- Parameters:
file
- the filebuilder
- the config builder
-
-
Method Details
-
getOriginal
Description copied from interface:Config
Get the original instance- Specified by:
getOriginal
in interfaceConfig
- Returns:
- the original instance
-
get
Description copied from interface:Config
Get the value from the path -
set
Description copied from interface:Config
Set the value to the path -
getName
Description copied from interface:Config
Get the name of the configuration -
getValues
Description copied from interface:Config
Get all values from the path -
clear
public void clear()Description copied from interface:Config
Remove all paths from the configuration -
setup
public void setup()Description copied from interface:Config
Set up the configuration -
save
public void save()Description copied from interface:Config
Save the configuration -
reload
public void reload()Description copied from interface:Config
Reload the configuration -
normalize
Description copied from interface:Config
Normalize the library-specific object -
isNormalizable
Description copied from interface:Config
Check if the object is normalizable- Specified by:
isNormalizable
in interfaceConfig
- Parameters:
object
- the object- Returns:
- true if it is
-
getComment
Description copied from interface:Config
Get the comment. This is a default empty method. The implementation can override this method to support comments.- Specified by:
getComment
in interfaceConfig
- Parameters:
type
- the comment typepath
- the path- Returns:
- the comment
-
setComment
Description copied from interface:Config
Set the comment This is a default empty method. The implementation can override this method to support comments.- Specified by:
setComment
in interfaceConfig
- Parameters:
type
- the comment typevalue
- the comment, can be null to remove the commentpath
- the path
-