Package redempt.redlib.config.data
Class ConfigurationSectionDataHolder
java.lang.Object
redempt.redlib.config.data.ConfigurationSectionDataHolder
- All Implemented Interfaces:
DataHolder
-
Constructor Summary
ConstructorDescriptionConfigurationSectionDataHolder
(org.bukkit.configuration.ConfigurationSection section) -
Method Summary
Modifier and TypeMethodDescriptionvoid
createSubsection
(String path) Creates a subsection of this DataHolderGets the object mapped to the given pathgetKeys()
Gets a list subsectionGets a string value from a pathgetSubsection
(String path) Gets an existing subsection of this DataHolderboolean
Checks whether a given path has a value associatedvoid
Removes a mappingvoid
Sets the object at a given pathvoid
setComments
(String path, List<String> comments) Sets comments on the given path, if it is supportedunwrap()
Unwraps the object this DataHolder wraps
-
Constructor Details
-
ConfigurationSectionDataHolder
public ConfigurationSectionDataHolder(org.bukkit.configuration.ConfigurationSection section)
-
-
Method Details
-
get
Description copied from interface:DataHolder
Gets the object mapped to the given path- Specified by:
get
in interfaceDataHolder
- Parameters:
path
- The path- Returns:
- The object mapped to the path
-
set
Description copied from interface:DataHolder
Sets the object at a given path- Specified by:
set
in interfaceDataHolder
- Parameters:
path
- The path to the objectobj
- The object to set
-
getSubsection
Description copied from interface:DataHolder
Gets an existing subsection of this DataHolder- Specified by:
getSubsection
in interfaceDataHolder
- Parameters:
path
- The path to the data- Returns:
- The subsection, or null
-
createSubsection
Description copied from interface:DataHolder
Creates a subsection of this DataHolder- Specified by:
createSubsection
in interfaceDataHolder
- Parameters:
path
- The path of the subsection to create- Returns:
- The created subsection
-
getKeys
- Specified by:
getKeys
in interfaceDataHolder
- Returns:
- All valid keys
-
isSet
Description copied from interface:DataHolder
Checks whether a given path has a value associated- Specified by:
isSet
in interfaceDataHolder
- Parameters:
path
- The path to check- Returns:
- Whether the path has an associated value
-
getString
Description copied from interface:DataHolder
Gets a string value from a path- Specified by:
getString
in interfaceDataHolder
- Parameters:
path
- The path to the string- Returns:
- The string
-
getList
Description copied from interface:DataHolder
Gets a list subsection- Specified by:
getList
in interfaceDataHolder
- Parameters:
path
- The path to the subsection- Returns:
- The list subsection, or null
-
remove
Description copied from interface:DataHolder
Removes a mapping- Specified by:
remove
in interfaceDataHolder
- Parameters:
path
- The path of the data to remove
-
unwrap
Description copied from interface:DataHolder
Unwraps the object this DataHolder wraps- Specified by:
unwrap
in interfaceDataHolder
- Returns:
- The wrapped storage
-
clearComments
public void clearComments() -
getComments
-
setComments
Description copied from interface:DataHolder
Sets comments on the given path, if it is supported- Specified by:
setComments
in interfaceDataHolder
- Parameters:
path
- The path to apply comments tocomments
- The comments to apply
-