Class BungeeScriptConfig
java.lang.Object
dev.magicmq.pyspigot.bungee.manager.config.BungeeScriptConfig
- All Implemented Interfaces:
dev.magicmq.pyspigot.manager.config.ScriptConfig
public class BungeeScriptConfig
extends Object
implements dev.magicmq.pyspigot.manager.config.ScriptConfig
A class representing a script configuration file, for the BungeeCord implementation.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean<T> TbooleangetBoolean(String path) booleangetBoolean(String path, boolean def) getBooleanList(String path) bytebytegetByteList(String path) charchargetCharList(String path) getDefault(String path) doubledoublegetDoubleList(String path) floatfloatgetFloatList(String path) intintgetIntList(String path) getKeys()List<?> List<?> longlonggetLongList(String path) net.md_5.bungee.config.ConfigurationgetSection(String path) shortshortgetShortList(String path) getStringList(String path) net.md_5.bungee.config.ConfigurationGets the underlying BungeeCordConfigurationobject.voidload()voidreload()voidsave()voidbooleansetIfNotExists(String path, Object value) Sets the specified path to the given value only if the path is not already set in the config file.
-
Constructor Details
-
BungeeScriptConfig
- 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:
-
getUnderlyingConfig
public net.md_5.bungee.config.Configuration getUnderlyingConfig()Gets the underlying BungeeCordConfigurationobject.- Returns:
- The underlying config object
-
get
-
contains
-
get
-
getDefault
-
set
-
getSection
-
getKeys
-
getByte
-
getByte
-
getByteList
-
getShort
-
getShort
-
getShortList
-
getInt
-
getInt
-
getIntList
-
getLong
-
getLong
-
getLongList
-
getFloat
-
getFloat
-
getFloatList
-
getDouble
-
getDouble
-
getDoubleList
-
getBoolean
-
getBoolean
-
getBooleanList
-
getChar
-
getChar
-
getCharList
-
getString
-
getString
-
getStringList
-
getList
-
getList
-