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

Public Member Functions

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 ()
 
void addDefault (String path, Object value)
 

Detailed Description

Represents a section of a Configuration

Definition at line 15 of file ConfigurationSection.java.

Member Function Documentation

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

Sets the default value in the root at 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.

If the value as returned by getDefaultSection() is null, then this will create a new section at the path, replacing anything that may have existed there previously.

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

Implemented in org.bukkit.configuration.MemorySection, org.bukkit.configuration.MemoryConfiguration, and org.bukkit.configuration.Configuration.

boolean org.bukkit.configuration.ConfigurationSection.contains ( String  path)

Checks if this ConfigurationSection contains the given path.

If the value for the requested path does not exist but a default value has been specified, this will return true.

Parameters
pathPath to check for existence.
Returns
True if this section contains the requested path, either via default or being set.
Exceptions
IllegalArgumentExceptionThrown when path is null.

Implemented in org.bukkit.configuration.MemorySection.

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

ConfigurationSection org.bukkit.configuration.ConfigurationSection.createSection ( String  path)

Creates an empty ConfigurationSection at the specified path.

Any value that was previously set at this path will be overwritten. If the previous value was itself a ConfigurationSection, it will be orphaned.

Parameters
pathPath to create the section at.
Returns
Newly created section

Implemented in org.bukkit.configuration.MemorySection.

Referenced by org.bukkit.configuration.MemorySection.createSection(), org.bukkit.configuration.MemorySection.set(), and org.bukkit.configuration.ConfigurationTest.testCreateSection().

ConfigurationSection org.bukkit.configuration.ConfigurationSection.createSection ( String  path,
Map<?,?>  map 
)

Creates a ConfigurationSection at the specified path, with specified values.

Any value that was previously set at this path will be overwritten. If the previous value was itself a ConfigurationSection, it will be orphaned.

Parameters
pathPath to create the section at.
mapThe values to used.
Returns
Newly created section

Implemented in org.bukkit.configuration.MemorySection.

Object org.bukkit.configuration.ConfigurationSection.get ( String  path)

Gets the requested Object by path.

If the Object does not exist but a default value has been specified, this will return the default value. If the Object does not exist and no default value was specified, this will return null.

Parameters
pathPath of the Object to get.
Returns
Requested Object.

Implemented in org.bukkit.configuration.MemorySection.

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

Object org.bukkit.configuration.ConfigurationSection.get ( String  path,
Object  def 
)

Gets the requested Object by path, returning a default value if not found.

If the Object does not exist then the specified default value will returned regardless of if a default has been identified in the root Configuration.

Parameters
pathPath of the Object to get.
defThe default value to return if the path is not found.
Returns
Requested Object.

Implemented in org.bukkit.configuration.MemorySection.

boolean org.bukkit.configuration.ConfigurationSection.getBoolean ( String  path)

Gets the requested boolean by path.

If the boolean does not exist but a default value has been specified, this will return the default value. If the boolean does not exist and no default value was specified, this will return false.

Parameters
pathPath of the boolean to get.
Returns
Requested boolean.

Implemented in org.bukkit.configuration.MemorySection.

boolean org.bukkit.configuration.ConfigurationSection.getBoolean ( String  path,
boolean  def 
)

Gets the requested boolean by path, returning a default value if not found.

If the boolean does not exist then the specified default value will returned regardless of if a default has been identified in the root Configuration.

Parameters
pathPath of the boolean to get.
defThe default value to return if the path is not found or is not a boolean.
Returns
Requested boolean.

Implemented in org.bukkit.configuration.MemorySection.

List<Boolean> org.bukkit.configuration.ConfigurationSection.getBooleanList ( String  path)

Gets the requested List of Boolean by path.

If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.

This method will attempt to cast any values into a Boolean if possible, but may miss any values out if they are not compatible.

Parameters
pathPath of the List to get.
Returns
Requested List of Boolean.

Implemented in org.bukkit.configuration.MemorySection.

List<Byte> org.bukkit.configuration.ConfigurationSection.getByteList ( String  path)

Gets the requested List of Byte by path.

If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.

This method will attempt to cast any values into a Byte if possible, but may miss any values out if they are not compatible.

Parameters
pathPath of the List to get.
Returns
Requested List of Byte.

Implemented in org.bukkit.configuration.MemorySection.

List<Character> org.bukkit.configuration.ConfigurationSection.getCharacterList ( String  path)

Gets the requested List of Character by path.

If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.

This method will attempt to cast any values into a Character if possible, but may miss any values out if they are not compatible.

Parameters
pathPath of the List to get.
Returns
Requested List of Character.

Implemented in org.bukkit.configuration.MemorySection.

Color org.bukkit.configuration.ConfigurationSection.getColor ( String  path)

Gets the requested Color by path.

If the Color does not exist but a default value has been specified, this will return the default value. If the Color does not exist and no default value was specified, this will return null.

Parameters
pathPath of the Color to get.
Returns
Requested Color.

Implemented in org.bukkit.configuration.MemorySection.

Color org.bukkit.configuration.ConfigurationSection.getColor ( String  path,
Color  def 
)

Gets the requested Color by path, returning a default value if not found.

If the Color does not exist then the specified default value will returned regardless of if a default has been identified in the root Configuration.

Parameters
pathPath of the Color to get.
defThe default value to return if the path is not found or is not a Color.
Returns
Requested Color.

Implemented in org.bukkit.configuration.MemorySection.

ConfigurationSection org.bukkit.configuration.ConfigurationSection.getConfigurationSection ( String  path)

Gets the requested ConfigurationSection by path.

If the ConfigurationSection does not exist but a default value has been specified, this will return the default value. If the ConfigurationSection does not exist and no default value was specified, this will return null.

Parameters
pathPath of the ConfigurationSection to get.
Returns
Requested ConfigurationSection.

Implemented in org.bukkit.configuration.MemorySection.

Referenced by org.bukkit.configuration.MemorySection.createSection(), org.bukkit.configuration.MemorySection.get(), org.bukkit.configuration.MemorySection.getDefaultSection(), and org.bukkit.configuration.MemorySection.set().

String org.bukkit.configuration.ConfigurationSection.getCurrentPath ( )

Gets the path of this ConfigurationSection from its root Configuration

For any Configuration themselves, this will return an empty string.

If the section is no longer contained within its root for any reason, such as being replaced with a different value, this may return null.

To retrieve the single name of this section, that is, the final part of the path returned by this method, you may use getName().

Returns
Path of this section relative to its root

Implemented in org.bukkit.configuration.MemorySection.

ConfigurationSection org.bukkit.configuration.ConfigurationSection.getDefaultSection ( )

Gets the equivalent ConfigurationSection from the default Configuration defined in getRoot().

If the root contains no defaults, or the defaults doesn't contain a value for this path, or the value at this path is not a ConfigurationSection then this will return null.

Returns
Equivalent section in root configuration

Implemented in org.bukkit.configuration.MemorySection.

double org.bukkit.configuration.ConfigurationSection.getDouble ( String  path)

Gets the requested double by path.

If the double does not exist but a default value has been specified, this will return the default value. If the double does not exist and no default value was specified, this will return 0.

Parameters
pathPath of the double to get.
Returns
Requested double.

Implemented in org.bukkit.configuration.MemorySection.

double org.bukkit.configuration.ConfigurationSection.getDouble ( String  path,
double  def 
)

Gets the requested double by path, returning a default value if not found.

If the double does not exist then the specified default value will returned regardless of if a default has been identified in the root Configuration.

Parameters
pathPath of the double to get.
defThe default value to return if the path is not found or is not a double.
Returns
Requested double.

Implemented in org.bukkit.configuration.MemorySection.

List<Double> org.bukkit.configuration.ConfigurationSection.getDoubleList ( String  path)

Gets the requested List of Double by path.

If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.

This method will attempt to cast any values into a Double if possible, but may miss any values out if they are not compatible.

Parameters
pathPath of the List to get.
Returns
Requested List of Double.

Implemented in org.bukkit.configuration.MemorySection.

List<Float> org.bukkit.configuration.ConfigurationSection.getFloatList ( String  path)

Gets the requested List of Float by path.

If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.

This method will attempt to cast any values into a Float if possible, but may miss any values out if they are not compatible.

Parameters
pathPath of the List to get.
Returns
Requested List of Float.

Implemented in org.bukkit.configuration.MemorySection.

int org.bukkit.configuration.ConfigurationSection.getInt ( String  path)

Gets the requested int by path.

If the int does not exist but a default value has been specified, this will return the default value. If the int does not exist and no default value was specified, this will return 0.

Parameters
pathPath of the int to get.
Returns
Requested int.

Implemented in org.bukkit.configuration.MemorySection.

int org.bukkit.configuration.ConfigurationSection.getInt ( String  path,
int  def 
)

Gets the requested int by path, returning a default value if not found.

If the int does not exist then the specified default value will returned regardless of if a default has been identified in the root Configuration.

Parameters
pathPath of the int to get.
defThe default value to return if the path is not found or is not an int.
Returns
Requested int.

Implemented in org.bukkit.configuration.MemorySection.

List<Integer> org.bukkit.configuration.ConfigurationSection.getIntegerList ( String  path)

Gets the requested List of Integer by path.

If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.

This method will attempt to cast any values into a Integer if possible, but may miss any values out if they are not compatible.

Parameters
pathPath of the List to get.
Returns
Requested List of Integer.

Implemented in org.bukkit.configuration.MemorySection.

ItemStack org.bukkit.configuration.ConfigurationSection.getItemStack ( String  path)

Gets the requested ItemStack by path.

If the ItemStack does not exist but a default value has been specified, this will return the default value. If the ItemStack does not exist and no default value was specified, this will return null.

Parameters
pathPath of the ItemStack to get.
Returns
Requested ItemStack.

Implemented in org.bukkit.configuration.MemorySection.

ItemStack org.bukkit.configuration.ConfigurationSection.getItemStack ( String  path,
ItemStack  def 
)

Gets the requested ItemStack by path, returning a default value if not found.

If the ItemStack does not exist then the specified default value will returned regardless of if a default has been identified in the root Configuration.

Parameters
pathPath of the ItemStack to get.
defThe default value to return if the path is not found or is not an ItemStack.
Returns
Requested ItemStack.

Implemented in org.bukkit.configuration.MemorySection.

Set<String> org.bukkit.configuration.ConfigurationSection.getKeys ( boolean  deep)

Gets a set containing all keys in this section.

If deep is set to true, then this will contain all the keys within any child ConfigurationSections (and their children, etc). These will be in a valid path notation for you to use.

If deep is set to false, then this will contain only the keys of any direct children, and not their own children.

Parameters
deepWhether or not to get a deep list, as opposed to a shallow list.
Returns
Set of keys contained within this ConfigurationSection.

Implemented in org.bukkit.configuration.MemorySection.

Referenced by org.bukkit.configuration.MemorySection.getKeys(), and org.bukkit.configuration.ConfigurationTest.testCreateSection().

List<?> org.bukkit.configuration.ConfigurationSection.getList ( String  path)

Gets the requested List by path.

If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return null.

Parameters
pathPath of the List to get.
Returns
Requested List.

Implemented in org.bukkit.configuration.MemorySection.

List<?> org.bukkit.configuration.ConfigurationSection.getList ( String  path,
List<?>  def 
)

Gets the requested List by path, returning a default value if not found.

If the List does not exist then the specified default value will returned regardless of if a default has been identified in the root Configuration.

Parameters
pathPath of the List to get.
defThe default value to return if the path is not found or is not a List.
Returns
Requested List.

Implemented in org.bukkit.configuration.MemorySection.

long org.bukkit.configuration.ConfigurationSection.getLong ( String  path)

Gets the requested long by path.

If the long does not exist but a default value has been specified, this will return the default value. If the long does not exist and no default value was specified, this will return 0.

Parameters
pathPath of the long to get.
Returns
Requested long.

Implemented in org.bukkit.configuration.MemorySection.

long org.bukkit.configuration.ConfigurationSection.getLong ( String  path,
long  def 
)

Gets the requested long by path, returning a default value if not found.

If the long does not exist then the specified default value will returned regardless of if a default has been identified in the root Configuration.

Parameters
pathPath of the long to get.
defThe default value to return if the path is not found or is not a long.
Returns
Requested long.

Implemented in org.bukkit.configuration.MemorySection.

List<Long> org.bukkit.configuration.ConfigurationSection.getLongList ( String  path)

Gets the requested List of Long by path.

If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.

This method will attempt to cast any values into a Long if possible, but may miss any values out if they are not compatible.

Parameters
pathPath of the List to get.
Returns
Requested List of Long.

Implemented in org.bukkit.configuration.MemorySection.

List<Map<?, ?> > org.bukkit.configuration.ConfigurationSection.getMapList ( String  path)

Gets the requested List of Maps by path.

If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.

This method will attempt to cast any values into a Map if possible, but may miss any values out if they are not compatible.

Parameters
pathPath of the List to get.
Returns
Requested List of Maps.

Implemented in org.bukkit.configuration.MemorySection.

String org.bukkit.configuration.ConfigurationSection.getName ( )

Gets the name of this individual ConfigurationSection, in the path.

This will always be the final part of getCurrentPath(), unless the section is orphaned.

Returns
Name of this section

Implemented in org.bukkit.configuration.MemorySection.

Referenced by org.bukkit.configuration.MemorySection.createPath().

OfflinePlayer org.bukkit.configuration.ConfigurationSection.getOfflinePlayer ( String  path)

Gets the requested OfflinePlayer by path.

If the OfflinePlayer does not exist but a default value has been specified, this will return the default value. If the OfflinePlayer does not exist and no default value was specified, this will return null.

Parameters
pathPath of the OfflinePlayer to get.
Returns
Requested OfflinePlayer.

Implemented in org.bukkit.configuration.MemorySection.

OfflinePlayer org.bukkit.configuration.ConfigurationSection.getOfflinePlayer ( String  path,
OfflinePlayer  def 
)

Gets the requested OfflinePlayer by path, returning a default value if not found.

If the OfflinePlayer does not exist then the specified default value will returned regardless of if a default has been identified in the root Configuration.

Parameters
pathPath of the OfflinePlayer to get.
defThe default value to return if the path is not found or is not an OfflinePlayer.
Returns
Requested OfflinePlayer.

Implemented in org.bukkit.configuration.MemorySection.

ConfigurationSection org.bukkit.configuration.ConfigurationSection.getParent ( )

Gets the parent ConfigurationSection that directly contains this ConfigurationSection.

For any Configuration themselves, this will return null.

If the section is no longer contained within its parent for any reason, such as being replaced with a different value, this may return null.

Returns
Parent section containing this section.

Implemented in org.bukkit.configuration.MemorySection, and org.bukkit.configuration.MemoryConfiguration.

Referenced by org.bukkit.configuration.MemorySection.createPath().

Configuration org.bukkit.configuration.ConfigurationSection.getRoot ( )

Gets the root Configuration that contains this ConfigurationSection

For any Configuration themselves, this will return its own object.

If the section is no longer contained within its root for any reason, such as being replaced with a different value, this may return null.

Returns
Root configuration containing this section.

Implemented in org.bukkit.configuration.MemorySection.

Referenced by org.bukkit.configuration.MemorySection.createPath(), and org.bukkit.configuration.MemorySection.MemorySection().

List<Short> org.bukkit.configuration.ConfigurationSection.getShortList ( String  path)

Gets the requested List of Short by path.

If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.

This method will attempt to cast any values into a Short if possible, but may miss any values out if they are not compatible.

Parameters
pathPath of the List to get.
Returns
Requested List of Short.

Implemented in org.bukkit.configuration.MemorySection.

String org.bukkit.configuration.ConfigurationSection.getString ( String  path)

Gets the requested String by path.

If the String does not exist but a default value has been specified, this will return the default value. If the String does not exist and no default value was specified, this will return null.

Parameters
pathPath of the String to get.
Returns
Requested String.

Implemented in org.bukkit.configuration.MemorySection.

String org.bukkit.configuration.ConfigurationSection.getString ( String  path,
String  def 
)

Gets the requested String by path, returning a default value if not found.

If the String does not exist then the specified default value will returned regardless of if a default has been identified in the root Configuration.

Parameters
pathPath of the String to get.
defThe default value to return if the path is not found or is not a String.
Returns
Requested String.

Implemented in org.bukkit.configuration.MemorySection.

List<String> org.bukkit.configuration.ConfigurationSection.getStringList ( String  path)

Gets the requested List of String by path.

If the List does not exist but a default value has been specified, this will return the default value. If the List does not exist and no default value was specified, this will return an empty List.

This method will attempt to cast any values into a String if possible, but may miss any values out if they are not compatible.

Parameters
pathPath of the List to get.
Returns
Requested List of String.

Implemented in org.bukkit.configuration.MemorySection.

Map<String, Object> org.bukkit.configuration.ConfigurationSection.getValues ( boolean  deep)

Gets a Map containing all keys and their values for this section.

If deep is set to true, then this will contain all the keys and values within any child ConfigurationSections (and their children, etc). These keys will be in a valid path notation for you to use.

If deep is set to false, then this will contain only the keys and values of any direct children, and not their own children.

Parameters
deepWhether or not to get a deep list, as opposed to a shallow list.
Returns
Map of keys and values of this section.

Implemented in org.bukkit.configuration.MemorySection.

Referenced by org.bukkit.configuration.MemoryConfiguration.addDefaults(), and org.bukkit.configuration.MemorySection.getValues().

Vector org.bukkit.configuration.ConfigurationSection.getVector ( String  path)

Gets the requested Vector by path.

If the Vector does not exist but a default value has been specified, this will return the default value. If the Vector does not exist and no default value was specified, this will return null.

Parameters
pathPath of the Vector to get.
Returns
Requested Vector.

Implemented in org.bukkit.configuration.MemorySection.

Vector org.bukkit.configuration.ConfigurationSection.getVector ( String  path,
Vector  def 
)

Gets the requested Vector by path, returning a default value if not found.

If the Vector does not exist then the specified default value will returned regardless of if a default has been identified in the root Configuration.

Parameters
pathPath of the Vector to get.
defThe default value to return if the path is not found or is not a Vector.
Returns
Requested Vector.

Implemented in org.bukkit.configuration.MemorySection.

boolean org.bukkit.configuration.ConfigurationSection.isBoolean ( String  path)

Checks if the specified path is a boolean.

If the path exists but is not a boolean, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a boolean and return appropriately.

Parameters
pathPath of the boolean to check.
Returns
Whether or not the specified path is a boolean.

Implemented in org.bukkit.configuration.MemorySection.

boolean org.bukkit.configuration.ConfigurationSection.isColor ( String  path)

Checks if the specified path is a Color.

If the path exists but is not a Color, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a Color and return appropriately.

Parameters
pathPath of the Color to check.
Returns
Whether or not the specified path is a Color.

Implemented in org.bukkit.configuration.MemorySection.

boolean org.bukkit.configuration.ConfigurationSection.isConfigurationSection ( String  path)

Checks if the specified path is a ConfigurationSection.

If the path exists but is not a ConfigurationSection, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a ConfigurationSection and return appropriately.

Parameters
pathPath of the ConfigurationSection to check.
Returns
Whether or not the specified path is a ConfigurationSection.

Implemented in org.bukkit.configuration.MemorySection.

Referenced by org.bukkit.configuration.MemorySection.getDefaultSection().

boolean org.bukkit.configuration.ConfigurationSection.isDouble ( String  path)

Checks if the specified path is a double.

If the path exists but is not a double, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a double and return appropriately.

Parameters
pathPath of the double to check.
Returns
Whether or not the specified path is a double.

Implemented in org.bukkit.configuration.MemorySection.

boolean org.bukkit.configuration.ConfigurationSection.isInt ( String  path)

Checks if the specified path is an int.

If the path exists but is not a int, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a int and return appropriately.

Parameters
pathPath of the int to check.
Returns
Whether or not the specified path is an int.

Implemented in org.bukkit.configuration.MemorySection.

boolean org.bukkit.configuration.ConfigurationSection.isItemStack ( String  path)

Checks if the specified path is an ItemStack.

If the path exists but is not a ItemStack, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a ItemStack and return appropriately.

Parameters
pathPath of the ItemStack to check.
Returns
Whether or not the specified path is an ItemStack.

Implemented in org.bukkit.configuration.MemorySection.

boolean org.bukkit.configuration.ConfigurationSection.isList ( String  path)

Checks if the specified path is a List.

If the path exists but is not a List, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a List and return appropriately.

Parameters
pathPath of the List to check.
Returns
Whether or not the specified path is a List.

Implemented in org.bukkit.configuration.MemorySection.

boolean org.bukkit.configuration.ConfigurationSection.isLong ( String  path)

Checks if the specified path is a long.

If the path exists but is not a long, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a long and return appropriately.

Parameters
pathPath of the long to check.
Returns
Whether or not the specified path is a long.

Implemented in org.bukkit.configuration.MemorySection.

boolean org.bukkit.configuration.ConfigurationSection.isOfflinePlayer ( String  path)

Checks if the specified path is an OfflinePlayer.

If the path exists but is not a OfflinePlayer, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a OfflinePlayer and return appropriately.

Parameters
pathPath of the OfflinePlayer to check.
Returns
Whether or not the specified path is an OfflinePlayer.

Implemented in org.bukkit.configuration.MemorySection.

boolean org.bukkit.configuration.ConfigurationSection.isSet ( String  path)

Checks if this ConfigurationSection has a value set for the given path.

If the value for the requested path does not exist but a default value has been specified, this will still return false.

Parameters
pathPath to check for existence.
Returns
True if this section contains the requested path, regardless of having a default.
Exceptions
IllegalArgumentExceptionThrown when path is null.

Implemented in org.bukkit.configuration.MemorySection.

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

boolean org.bukkit.configuration.ConfigurationSection.isString ( String  path)

Checks if the specified path is a String.

If the path exists but is not a String, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a String and return appropriately.

Parameters
pathPath of the String to check.
Returns
Whether or not the specified path is a String.

Implemented in org.bukkit.configuration.MemorySection.

boolean org.bukkit.configuration.ConfigurationSection.isVector ( String  path)

Checks if the specified path is a Vector.

If the path exists but is not a Vector, this will return false. If the path does not exist, this will return false. If the path does not exist but a default value has been specified, this will check if that default value is a Vector and return appropriately.

Parameters
pathPath of the Vector to check.
Returns
Whether or not the specified path is a Vector.

Implemented in org.bukkit.configuration.MemorySection.

void org.bukkit.configuration.ConfigurationSection.set ( String  path,
Object  value 
)

Sets the specified path to the given value.

If value is null, the entry will be removed. Any existing entry will be replaced, regardless of what the new value is.

Some implementations may have limitations on what you may store. See their individual javadocs for details. No implementations should allow you to store Configurations or ConfigurationSections, please use createSection(java.lang.String) for that.

Parameters
pathPath of the object to set.
valueNew value to set the path to.

Implemented in org.bukkit.configuration.MemorySection.

Referenced by org.bukkit.configuration.MemoryConfiguration.addDefault(), org.bukkit.configuration.MemorySection.createSection(), org.bukkit.configuration.MemorySection.set(), org.bukkit.configuration.ConfigurationTest.testAddDefaults_Configuration(), and org.bukkit.configuration.ConfigurationTest.testSetDefaults().


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