Class BukkitScriptConfig
java.lang.Object
org.bukkit.configuration.MemorySection
org.bukkit.configuration.MemoryConfiguration
org.bukkit.configuration.file.FileConfiguration
org.bukkit.configuration.file.YamlConfiguration
dev.magicmq.pyspigot.bukkit.manager.config.BukkitScriptConfig
- All Implemented Interfaces:
dev.magicmq.pyspigot.manager.config.ScriptConfig,Configuration,ConfigurationSection
public class BukkitScriptConfig
extends YamlConfiguration
implements dev.magicmq.pyspigot.manager.config.ScriptConfig
A class representing a script configuration file, for the Bukkit implementation.
- See Also:
-
Field Summary
Fields inherited from class org.bukkit.configuration.file.YamlConfiguration
BLANK_CONFIG, COMMENT_PREFIXFields inherited from class org.bukkit.configuration.MemoryConfiguration
optionsFields inherited from class org.bukkit.configuration.MemorySection
map -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.bukkit.configuration.file.YamlConfiguration
loadConfiguration, loadConfiguration, loadFromString, options, saveToStringMethods inherited from class org.bukkit.configuration.file.FileConfiguration
buildHeader, 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, 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, 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, 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
-
Constructor Details
-
BukkitScriptConfig
- Parameters:
configFile- The configuration filedefaults- A YAML-formatted string containing the desired default values for the configuration
-
-
Method Details
-
getConfigFile
- Specified by:
getConfigFilein interfacedev.magicmq.pyspigot.manager.config.ScriptConfig
-
getConfigPath
- Specified by:
getConfigPathin interfacedev.magicmq.pyspigot.manager.config.ScriptConfig
-
load
- Specified by:
loadin interfacedev.magicmq.pyspigot.manager.config.ScriptConfig- Throws:
IOException
-
reload
- Specified by:
reloadin interfacedev.magicmq.pyspigot.manager.config.ScriptConfig- Throws:
IOException
-
save
- Specified by:
savein interfacedev.magicmq.pyspigot.manager.config.ScriptConfig- Throws:
IOException
-
setIfNotExists
Sets the specified path to the given value only if the path is not already set in the config file. Any specified default values are ignored when checking if the path is set.- Specified by:
setIfNotExistsin interfacedev.magicmq.pyspigot.manager.config.ScriptConfig- Parameters:
path- Path of the object to setvalue- Value to set the path to- Returns:
- True if the path was set to the value (in other words the path was not previously set), false if the path was not set to the value (in other words the path was already previously set)
- See Also:
-