Package org.sgrewritten.stargate.config
Class StargateYamlConfiguration
java.lang.Object
org.bukkit.configuration.MemorySection
org.bukkit.configuration.MemoryConfiguration
org.bukkit.configuration.file.FileConfiguration
org.bukkit.configuration.file.YamlConfiguration
org.sgrewritten.stargate.config.StargateYamlConfiguration
- All Implemented Interfaces:
org.bukkit.configuration.Configuration
,org.bukkit.configuration.ConfigurationSection
public class StargateYamlConfiguration
extends org.bukkit.configuration.file.YamlConfiguration
A YAML configuration which retains all comments
This configuration converts all comments to YAML values when loaded, which all start with comment_. When saved, those YAML values are converted to normal text comments. This ensures that the comments aren't removed by the YamlConfiguration during its parsing.
- Author:
- Kristian Knarvik, Thorin
-
Field Summary
Fields inherited from class org.bukkit.configuration.file.YamlConfiguration
BLANK_CONFIG, COMMENT_PREFIX
Fields inherited from class org.bukkit.configuration.MemoryConfiguration
defaults, options
Fields inherited from class org.bukkit.configuration.MemorySection
map
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull String
void
loadFromString
(@NotNull String contents) @NotNull String
Methods inherited from class org.bukkit.configuration.file.YamlConfiguration
loadConfiguration, loadConfiguration, options
Methods inherited from class org.bukkit.configuration.file.FileConfiguration
load, load, load, save, save
Methods inherited from class org.bukkit.configuration.MemoryConfiguration
addDefault, addDefaults, addDefaults, getDefaults, getParent, setDefaults
Methods inherited from class org.bukkit.configuration.MemorySection
contains, contains, createPath, createPath, createSection, createSection, get, get, getBoolean, getBoolean, getBooleanList, getByteList, getCharacterList, getColor, getColor, getComments, getConfigurationSection, getCurrentPath, getDefault, getDefaultSection, getDouble, getDouble, getDoubleList, getFloatList, getInlineComments, getInt, getInt, getIntegerList, getItemStack, getItemStack, getKeys, getList, getList, getLocation, getLocation, getLong, getLong, getLongList, getMapList, getName, getObject, getObject, getOfflinePlayer, getOfflinePlayer, getRoot, getSerializable, getSerializable, getShortList, getString, getString, getStringList, getValues, getVector, getVector, isBoolean, isColor, isConfigurationSection, isDouble, isInt, isItemStack, isList, isLocation, isLong, isOfflinePlayer, isPrimitiveWrapper, isSet, isString, isVector, mapChildrenKeys, mapChildrenValues, set, setComments, setInlineComments, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.bukkit.configuration.ConfigurationSection
contains, contains, createSection, createSection, get, get, getBoolean, getBoolean, getBooleanList, getByteList, getCharacterList, getColor, getColor, getComments, getComponent, getComponent, getConfigurationSection, getCurrentPath, getDefaultSection, getDouble, getDouble, getDoubleList, getFloatList, getInlineComments, getInt, getInt, getIntegerList, getItemStack, getItemStack, getKeys, getList, getList, getLocation, getLocation, getLong, getLong, getLongList, getMapList, getName, getObject, getObject, getOfflinePlayer, getOfflinePlayer, getRichMessage, getRichMessage, getRoot, getSerializable, getSerializable, getShortList, getString, getString, getStringList, getValues, getVector, getVector, isBoolean, isColor, isConfigurationSection, isDouble, isInt, isItemStack, isList, isLocation, isLong, isOfflinePlayer, isSet, isString, isVector, set, setComments, setComponent, setInlineComments, setRichMessage
-
Field Details
-
START_OF_COMMENT_LINE
- See Also:
-
END_OF_COMMENT
- See Also:
-
START_OF_COMMENT
- See Also:
-
-
Constructor Details
-
StargateYamlConfiguration
public StargateYamlConfiguration()
-
-
Method Details
-
buildHeader
- Overrides:
buildHeader
in classorg.bukkit.configuration.file.FileConfiguration
-
saveToString
- Overrides:
saveToString
in classorg.bukkit.configuration.file.YamlConfiguration
-
loadFromString
public void loadFromString(@NotNull @NotNull String contents) throws org.bukkit.configuration.InvalidConfigurationException - Overrides:
loadFromString
in classorg.bukkit.configuration.file.YamlConfiguration
- Throws:
org.bukkit.configuration.InvalidConfigurationException
-