Package redempt.redlib.config.data
Class ConfigurationSectionDataHolder
java.lang.Object
redempt.redlib.config.data.ConfigurationSectionDataHolder
- All Implemented Interfaces:
DataHolder
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationSectionDataHolder(org.bukkit.configuration.ConfigurationSection section) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateSubsection(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 DataHolderbooleanChecks whether a given path has a value associatedvoidRemoves a mappingvoidSets the object at a given pathvoidsetComments(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:DataHolderGets the object mapped to the given path- Specified by:
getin interfaceDataHolder- Parameters:
path- The path- Returns:
- The object mapped to the path
-
set
Description copied from interface:DataHolderSets the object at a given path- Specified by:
setin interfaceDataHolder- Parameters:
path- The path to the objectobj- The object to set
-
getSubsection
Description copied from interface:DataHolderGets an existing subsection of this DataHolder- Specified by:
getSubsectionin interfaceDataHolder- Parameters:
path- The path to the data- Returns:
- The subsection, or null
-
createSubsection
Description copied from interface:DataHolderCreates a subsection of this DataHolder- Specified by:
createSubsectionin interfaceDataHolder- Parameters:
path- The path of the subsection to create- Returns:
- The created subsection
-
getKeys
- Specified by:
getKeysin interfaceDataHolder- Returns:
- All valid keys
-
isSet
Description copied from interface:DataHolderChecks whether a given path has a value associated- Specified by:
isSetin interfaceDataHolder- Parameters:
path- The path to check- Returns:
- Whether the path has an associated value
-
getString
Description copied from interface:DataHolderGets a string value from a path- Specified by:
getStringin interfaceDataHolder- Parameters:
path- The path to the string- Returns:
- The string
-
getList
Description copied from interface:DataHolderGets a list subsection- Specified by:
getListin interfaceDataHolder- Parameters:
path- The path to the subsection- Returns:
- The list subsection, or null
-
remove
Description copied from interface:DataHolderRemoves a mapping- Specified by:
removein interfaceDataHolder- Parameters:
path- The path of the data to remove
-
unwrap
Description copied from interface:DataHolderUnwraps the object this DataHolder wraps- Specified by:
unwrapin interfaceDataHolder- Returns:
- The wrapped storage
-
clearComments
public void clearComments() -
getComments
-
setComments
Description copied from interface:DataHolderSets comments on the given path, if it is supported- Specified by:
setCommentsin interfaceDataHolder- Parameters:
path- The path to apply comments tocomments- The comments to apply
-