|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Configuration
Represents a source of configurable options and settings
| Method Summary | |
|---|---|
void |
addDefault(String path,
Object value)
Sets the default value of the given path as provided. |
void |
addDefaults(Configuration defaults)
Sets the default values of the given paths as provided. |
void |
addDefaults(Map<String,Object> defaults)
Sets the default values of the given paths as provided. |
Configuration |
getDefaults()
Gets the source Configuration for this configuration. |
ConfigurationOptions |
options()
Gets the ConfigurationOptions for this Configuration. |
void |
setDefaults(Configuration defaults)
Sets the source of all default values for this Configuration. |
| Methods inherited from interface org.bukkit.configuration.ConfigurationSection |
|---|
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, getParent, getRoot, getShortList, getString, getString, getStringList, getValues, getVector, getVector, isBoolean, isColor, isConfigurationSection, isDouble, isInt, isItemStack, isList, isLong, isOfflinePlayer, isSet, isString, isVector, set |
| Method Detail |
|---|
void addDefault(String path,
Object value)
Configuration was provided as a default collection,
then a new MemoryConfiguration will be created to hold the new default
value.
If value is null, the value will be removed from the default Configuration source.
addDefault in interface ConfigurationSectionpath - Path of the value to set.value - Value to set the default to.
IllegalArgumentException - Thrown if path is null.void addDefaults(Map<String,Object> defaults)
Configuration was provided as a default collection,
then a new MemoryConfiguration will be created to hold the new default
values.
defaults - A map of Path->Values to add to defaults.
IllegalArgumentException - Thrown if defaults is null.void addDefaults(Configuration defaults)
Configuration was provided as a default collection,
then a new MemoryConfiguration will be created to hold the new default
value.
This method will not hold a reference to the specified Configuration, nor will it
automatically update if that Configuration ever changes. If you require this,
you should set the default source with setDefaults(org.bukkit.configuration.Configuration).
defaults - A configuration holding a list of defaults to copy.
IllegalArgumentException - Thrown if defaults is null or this.void setDefaults(Configuration defaults)
Configuration.
If a previous source was set, or previous default values were defined, then they will
not be copied to the new source.
defaults - New source of default values for this configuration.
IllegalArgumentException - Thrown if defaults is null or this.Configuration getDefaults()
Configuration for this configuration.
If no configuration source was set, but default values were added, then a
MemoryConfiguration will be returned. If no source was set and no
defaults were set, then this method will return null.
ConfigurationOptions options()
ConfigurationOptions for this Configuration.
All setters through this method are chainable.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||