![]() |
Bukkit
1.4.7-R1.0
|
Represents a source of configurable options and settings. More...
Inheritance diagram for org.bukkit.configuration.Configuration:
Collaboration diagram for org.bukkit.configuration.Configuration:Public Member Functions | |
| void | addDefault (String path, Object value) |
| Sets the default value of the given path as provided. | |
| void | addDefaults (Map< String, Object > defaults) |
| Sets the default values of the given paths as provided. | |
| void | addDefaults (Configuration defaults) |
| Sets the default values of the given paths as provided. | |
| void | setDefaults (Configuration defaults) |
| Sets the source of all default values for this Configuration. | |
| Configuration | getDefaults () |
| Gets the source Configuration for this configuration. | |
| ConfigurationOptions | options () |
| Gets the ConfigurationOptions for this Configuration. | |
Public Member Functions inherited from org.bukkit.configuration.ConfigurationSection | |
| Set< String > | getKeys (boolean deep) |
| Gets a set containing all keys in this section. | |
| Map< String, Object > | getValues (boolean deep) |
| Gets a Map containing all keys and their values for this section. | |
| boolean | contains (String path) |
| Checks if this ConfigurationSection contains the given path. | |
| boolean | isSet (String path) |
| Checks if this ConfigurationSection has a value set for the given path. | |
| String | getCurrentPath () |
| Gets the path of this ConfigurationSection from its root Configuration. | |
| String | getName () |
| Gets the name of this individual ConfigurationSection, in the path. | |
| Configuration | getRoot () |
| Gets the root Configuration that contains this ConfigurationSection. | |
| ConfigurationSection | getParent () |
| Gets the parent ConfigurationSection that directly contains this ConfigurationSection. | |
| Object | get (String path) |
| Gets the requested Object by path. | |
| Object | get (String path, Object def) |
| Gets the requested Object by path, returning a default value if not found. | |
| void | set (String path, Object value) |
| Sets the specified path to the given value. | |
| ConfigurationSection | createSection (String path) |
| Creates an empty ConfigurationSection at the specified path. | |
| ConfigurationSection | createSection (String path, Map<?,?> map) |
| Creates a ConfigurationSection at the specified path, with specified values. | |
| String | getString (String path) |
| Gets the requested String by path. | |
| String | getString (String path, String def) |
| Gets the requested String by path, returning a default value if not found. | |
| boolean | isString (String path) |
| Checks if the specified path is a String. | |
| int | getInt (String path) |
| Gets the requested int by path. | |
| int | getInt (String path, int def) |
| Gets the requested int by path, returning a default value if not found. | |
| boolean | isInt (String path) |
| Checks if the specified path is an int. | |
| boolean | getBoolean (String path) |
| Gets the requested boolean by path. | |
| boolean | getBoolean (String path, boolean def) |
| Gets the requested boolean by path, returning a default value if not found. | |
| boolean | isBoolean (String path) |
| Checks if the specified path is a boolean. | |
| double | getDouble (String path) |
| Gets the requested double by path. | |
| double | getDouble (String path, double def) |
| Gets the requested double by path, returning a default value if not found. | |
| boolean | isDouble (String path) |
| Checks if the specified path is a double. | |
| long | getLong (String path) |
| Gets the requested long by path. | |
| long | getLong (String path, long def) |
| Gets the requested long by path, returning a default value if not found. | |
| boolean | isLong (String path) |
| Checks if the specified path is a long. | |
| List<?> | getList (String path) |
| Gets the requested List by path. | |
| List<?> | getList (String path, List<?> def) |
| Gets the requested List by path, returning a default value if not found. | |
| boolean | isList (String path) |
| Checks if the specified path is a List. | |
| List< String > | getStringList (String path) |
| Gets the requested List of String by path. | |
| List< Integer > | getIntegerList (String path) |
| Gets the requested List of Integer by path. | |
| List< Boolean > | getBooleanList (String path) |
| Gets the requested List of Boolean by path. | |
| List< Double > | getDoubleList (String path) |
| Gets the requested List of Double by path. | |
| List< Float > | getFloatList (String path) |
| Gets the requested List of Float by path. | |
| List< Long > | getLongList (String path) |
| Gets the requested List of Long by path. | |
| List< Byte > | getByteList (String path) |
| Gets the requested List of Byte by path. | |
| List< Character > | getCharacterList (String path) |
| Gets the requested List of Character by path. | |
| List< Short > | getShortList (String path) |
| Gets the requested List of Short by path. | |
| List< Map<?,?> > | getMapList (String path) |
| Gets the requested List of Maps by path. | |
| Vector | getVector (String path) |
| Gets the requested Vector by path. | |
| Vector | getVector (String path, Vector def) |
| Gets the requested Vector by path, returning a default value if not found. | |
| boolean | isVector (String path) |
| Checks if the specified path is a Vector. | |
| OfflinePlayer | getOfflinePlayer (String path) |
| Gets the requested OfflinePlayer by path. | |
| OfflinePlayer | getOfflinePlayer (String path, OfflinePlayer def) |
| Gets the requested OfflinePlayer by path, returning a default value if not found. | |
| boolean | isOfflinePlayer (String path) |
| Checks if the specified path is an OfflinePlayer. | |
| ItemStack | getItemStack (String path) |
| Gets the requested ItemStack by path. | |
| ItemStack | getItemStack (String path, ItemStack def) |
| Gets the requested ItemStack by path, returning a default value if not found. | |
| boolean | isItemStack (String path) |
| Checks if the specified path is an ItemStack. | |
| Color | getColor (String path) |
| Gets the requested Color by path. | |
| Color | getColor (String path, Color def) |
| Gets the requested Color by path, returning a default value if not found. | |
| boolean | isColor (String path) |
| Checks if the specified path is a Color. | |
| ConfigurationSection | getConfigurationSection (String path) |
| Gets the requested ConfigurationSection by path. | |
| boolean | isConfigurationSection (String path) |
| Checks if the specified path is a ConfigurationSection. | |
| ConfigurationSection | getDefaultSection () |
| Gets the equivalent ConfigurationSection from the default Configuration defined in getRoot(). | |
| void | addDefault (String path, Object value) |
| Sets the default value in the root at the given path as provided. | |
Represents a source of configurable options and settings.
Definition at line 8 of file Configuration.java.
| 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.
| path | Path of the value to set. |
| value | Value to set the default to. |
| IllegalArgumentException | Thrown if path is null. |
Referenced by org.bukkit.configuration.MemorySection.addDefault().
| 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.
| defaults | A map of Path->Values to add to defaults. |
| IllegalArgumentException | Thrown if defaults is null. |
| 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).
| defaults | A configuration holding a list of defaults to copy. |
| IllegalArgumentException | Thrown if defaults is null or this. |
| 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.
Referenced by org.bukkit.configuration.MemorySection.getDefault(), and org.bukkit.configuration.MemorySection.getDefaultSection().
| ConfigurationOptions org.bukkit.configuration.Configuration.options | ( | ) |
Gets the ConfigurationOptions for this Configuration.
All setters through this method are chainable.
Referenced by org.bukkit.configuration.MemorySection.createPath(), org.bukkit.configuration.MemorySection.createSection(), org.bukkit.configuration.MemorySection.get(), org.bukkit.configuration.MemorySection.isSet(), and org.bukkit.configuration.MemorySection.set().
| 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.
| defaults | New source of default values for this configuration. |
| IllegalArgumentException | Thrown if defaults is null or this. |