Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.configuration.Configuration Interface Reference
Inheritance diagram for org.bukkit.configuration.Configuration:
org.bukkit.configuration.ConfigurationSection org.bukkit.configuration.MemoryConfiguration org.bukkit.configuration.file.FileConfiguration org.bukkit.configuration.file.YamlConfiguration

Public Member Functions

void addDefault (String path, Object value)
 
void addDefaults (Map< String, Object > defaults)
 
void addDefaults (Configuration defaults)
 
void setDefaults (Configuration defaults)
 
Configuration getDefaults ()
 
ConfigurationOptions options ()
 
- Public Member Functions inherited from org.bukkit.configuration.ConfigurationSection
Set< String > getKeys (boolean deep)
 
Map< String, Object > getValues (boolean deep)
 
boolean contains (String path)
 
boolean isSet (String path)
 
String getCurrentPath ()
 
String getName ()
 
Configuration getRoot ()
 
ConfigurationSection getParent ()
 
Object get (String path)
 
Object get (String path, Object def)
 
void set (String path, Object value)
 
ConfigurationSection createSection (String path)
 
ConfigurationSection createSection (String path, Map<?,?> map)
 
String getString (String path)
 
String getString (String path, String def)
 
boolean isString (String path)
 
int getInt (String path)
 
int getInt (String path, int def)
 
boolean isInt (String path)
 
boolean getBoolean (String path)
 
boolean getBoolean (String path, boolean def)
 
boolean isBoolean (String path)
 
double getDouble (String path)
 
double getDouble (String path, double def)
 
boolean isDouble (String path)
 
long getLong (String path)
 
long getLong (String path, long def)
 
boolean isLong (String path)
 
List<?> getList (String path)
 
List<?> getList (String path, List<?> def)
 
boolean isList (String path)
 
List< String > getStringList (String path)
 
List< Integer > getIntegerList (String path)
 
List< Boolean > getBooleanList (String path)
 
List< Double > getDoubleList (String path)
 
List< Float > getFloatList (String path)
 
List< Long > getLongList (String path)
 
List< Byte > getByteList (String path)
 
List< Character > getCharacterList (String path)
 
List< Short > getShortList (String path)
 
List< Map<?,?> > getMapList (String path)
 
Vector getVector (String path)
 
Vector getVector (String path, Vector def)
 
boolean isVector (String path)
 
OfflinePlayer getOfflinePlayer (String path)
 
OfflinePlayer getOfflinePlayer (String path, OfflinePlayer def)
 
boolean isOfflinePlayer (String path)
 
ItemStack getItemStack (String path)
 
ItemStack getItemStack (String path, ItemStack def)
 
boolean isItemStack (String path)
 
Color getColor (String path)
 
Color getColor (String path, Color def)
 
boolean isColor (String path)
 
ConfigurationSection getConfigurationSection (String path)
 
boolean isConfigurationSection (String path)
 
ConfigurationSection getDefaultSection ()
 

Detailed Description

Represents a source of configurable options and settings

Definition at line 8 of file Configuration.java.

Member Function Documentation

void org.bukkit.configuration.Configuration.addDefault ( String  path,
Object  value 
)

Sets the default value of the given path as provided.

If no source 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.

Parameters
pathPath of the value to set.
valueValue to set the default to.
Exceptions
IllegalArgumentExceptionThrown if path is null.

Implements org.bukkit.configuration.ConfigurationSection.

Implemented in org.bukkit.configuration.MemoryConfiguration.

Referenced by org.bukkit.configuration.MemorySection.addDefault(), and org.bukkit.configuration.ConfigurationTest.testAddDefault().

void org.bukkit.configuration.Configuration.addDefaults ( Map< String, Object >  defaults)

Sets the default values of the given paths as provided.

If no source Configuration was provided as a default collection, then a new MemoryConfiguration will be created to hold the new default values.

Parameters
defaultsA map of Path->Values to add to defaults.
Exceptions
IllegalArgumentExceptionThrown if defaults is null.

Implemented in org.bukkit.configuration.MemoryConfiguration.

Referenced by org.bukkit.configuration.ConfigurationTest.testAddDefaults_Configuration(), and org.bukkit.configuration.ConfigurationTest.testAddDefaults_Map().

void org.bukkit.configuration.Configuration.addDefaults ( Configuration  defaults)

Sets the default values of the given paths as provided.

If no source 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).

Parameters
defaultsA configuration holding a list of defaults to copy.
Exceptions
IllegalArgumentExceptionThrown if defaults is null or this.

Implemented in org.bukkit.configuration.MemoryConfiguration.

Configuration org.bukkit.configuration.Configuration.getDefaults ( )

Gets the source 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.

Returns
Configuration source for default values, or null if none exist.

Implemented in org.bukkit.configuration.MemoryConfiguration.

Referenced by org.bukkit.configuration.MemorySection.getDefaultSection(), org.bukkit.configuration.ConfigurationTest.testAddDefault(), org.bukkit.configuration.ConfigurationTest.testAddDefaults_Configuration(), org.bukkit.configuration.ConfigurationTest.testAddDefaults_Map(), org.bukkit.configuration.ConfigurationTest.testGetDefaults(), and org.bukkit.configuration.ConfigurationTest.testSetDefaults().

void org.bukkit.configuration.Configuration.setDefaults ( Configuration  defaults)

Sets the source of all default values for this Configuration.

If a previous source was set, or previous default values were defined, then they will not be copied to the new source.

Parameters
defaultsNew source of default values for this configuration.
Exceptions
IllegalArgumentExceptionThrown if defaults is null or this.

Implemented in org.bukkit.configuration.MemoryConfiguration.

Referenced by org.bukkit.configuration.ConfigurationTest.testGetDefaults(), and org.bukkit.configuration.ConfigurationTest.testSetDefaults().


The documentation for this interface was generated from the following file: