Package de.marcely.bedwars.tools
Class YamlConfigurationDescriptor
java.lang.Object
org.bukkit.configuration.MemorySection
org.bukkit.configuration.MemoryConfiguration
org.bukkit.configuration.file.FileConfiguration
org.bukkit.configuration.file.YamlConfiguration
de.marcely.bedwars.tools.YamlConfigurationDescriptor
- All Implemented Interfaces:
Configuration,ConfigurationSection
Bukkit's implementation of
YamlConfiguration don't support saving of comments or descriptions.
This class is making it possible.-
Field Summary
Fields inherited from class org.bukkit.configuration.file.YamlConfiguration
BLANK_CONFIG, COMMENT_PREFIXFields inherited from class org.bukkit.configuration.MemoryConfiguration
defaults, optionsFields inherited from class org.bukkit.configuration.MemorySection
map -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComment(String comment) Adds a comment to the configurationvoidAdds an empty line to the configurationvoidaddEmptyLine(ConfigurationSection section) Adds a new empty line at the height of the configuration section.Methods inherited from class org.bukkit.configuration.file.YamlConfiguration
buildHeader, convertMapsToSections, loadConfiguration, loadConfiguration, loadFromString, options, parseHeaderMethods inherited from class org.bukkit.configuration.file.FileConfiguration
load, load, load, save, saveMethods inherited from class org.bukkit.configuration.MemoryConfiguration
addDefault, addDefaults, addDefaults, getDefaults, getParent, setDefaultsMethods inherited from class org.bukkit.configuration.MemorySection
contains, contains, createPath, createPath, createSection, createSection, get, get, getBoolean, getBoolean, getBooleanList, getByteList, getCharacterList, getColor, getColor, getConfigurationSection, getCurrentPath, getDefault, getDefaultSection, getDouble, getDouble, getDoubleList, getFloatList, getInt, getInt, getIntegerList, getItemStack, getItemStack, getKeys, getList, getList, getLong, getLong, getLongList, getMapList, getName, getOfflinePlayer, getOfflinePlayer, getRoot, getSerializable, getSerializable, getShortList, getString, getString, getStringList, getValues, getVector, getVector, isBoolean, isColor, isConfigurationSection, isDouble, isInt, isItemStack, isList, isLong, isOfflinePlayer, isPrimitiveWrapper, isSet, isString, isVector, mapChildrenKeys, mapChildrenValues, set, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.configuration.ConfigurationSection
contains, contains, createSection, createSection, get, get, getBoolean, getBoolean, getBooleanList, getByteList, getCharacterList, getColor, getColor, getConfigurationSection, getCurrentPath, getDefaultSection, getDouble, getDouble, getDoubleList, getFloatList, getInt, getInt, getIntegerList, getItemStack, getItemStack, getKeys, getList, getList, getLong, getLong, getLongList, getMapList, getName, getOfflinePlayer, getOfflinePlayer, getRoot, getSerializable, getSerializable, getShortList, getString, getString, getStringList, getValues, getVector, getVector, isBoolean, isColor, isConfigurationSection, isDouble, isInt, isItemStack, isList, isLong, isOfflinePlayer, isSet, isString, isVector, set
-
Constructor Details
-
YamlConfigurationDescriptor
public YamlConfigurationDescriptor()
-
-
Method Details
-
addComment
Adds a comment to the configuration- Parameters:
comment- What the comment shall say
-
addEmptyLine
public void addEmptyLine()Adds an empty line to the configuration -
addEmptyLine
Adds a new empty line at the height of the configuration section.Keep in mind that it's not possible to use
addEmptyLine()to put an empty line between sections due to technical reasons. Simply use this method to put- Parameters:
section- To which section the empty line shall be added to
-
saveToString
- Overrides:
saveToStringin classYamlConfiguration
-