mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Pulling all pending Bukkit-JavaDoc changes
By: Edmond Poon <sagaciouszzzz@gmail.com>
This commit is contained in:
@@ -8,11 +8,11 @@ import java.util.Map;
|
||||
public interface Configuration extends ConfigurationSection {
|
||||
/**
|
||||
* Sets the default value of the given path as provided.
|
||||
* <p />
|
||||
* <p>
|
||||
* If no source {@link Configuration} was provided as a default collection,
|
||||
* then a new {@link MemoryConfiguration} will be created to hold the new default
|
||||
* value.
|
||||
* <p />
|
||||
* <p>
|
||||
* If value is null, the value will be removed from the default Configuration source.
|
||||
*
|
||||
* @param path Path of the value to set.
|
||||
@@ -23,7 +23,7 @@ public interface Configuration extends ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Sets the default values of the given paths as provided.
|
||||
* <p />
|
||||
* <p>
|
||||
* If no source {@link Configuration} was provided as a default collection,
|
||||
* then a new {@link MemoryConfiguration} will be created to hold the new default
|
||||
* values.
|
||||
@@ -35,11 +35,11 @@ public interface Configuration extends ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Sets the default values of the given paths as provided.
|
||||
* <p />
|
||||
* <p>
|
||||
* If no source {@link Configuration} was provided as a default collection,
|
||||
* then a new {@link MemoryConfiguration} will be created to hold the new default
|
||||
* value.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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 {@link #setDefaults(org.bukkit.configuration.Configuration)}.
|
||||
@@ -51,7 +51,7 @@ public interface Configuration extends ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Sets the source of all default values for this {@link Configuration}.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a previous source was set, or previous default values were defined, then they will
|
||||
* not be copied to the new source.
|
||||
*
|
||||
@@ -62,7 +62,7 @@ public interface Configuration extends ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the source {@link Configuration} for this configuration.
|
||||
* <p />
|
||||
* <p>
|
||||
* If no configuration source was set, but default values were added, then a
|
||||
* {@link MemoryConfiguration} will be returned. If no source was set and no
|
||||
* defaults were set, then this method will return null.
|
||||
@@ -73,7 +73,7 @@ public interface Configuration extends ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the {@link ConfigurationOptions} for this {@link Configuration}.
|
||||
* <p />
|
||||
* <p>
|
||||
* All setters through this method are chainable.
|
||||
*
|
||||
* @return Options for this configuration
|
||||
|
@@ -23,7 +23,7 @@ public class ConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Gets the char that will be used to separate {@link ConfigurationSection}s
|
||||
* <p />
|
||||
* <p>
|
||||
* This value does not affect how the {@link Configuration} is stored, only in
|
||||
* how you access the data. The default value is '.'.
|
||||
*
|
||||
@@ -35,7 +35,7 @@ public class ConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Sets the char that will be used to separate {@link ConfigurationSection}s
|
||||
* <p />
|
||||
* <p>
|
||||
* This value does not affect how the {@link Configuration} is stored, only in
|
||||
* how you access the data. The default value is '.'.
|
||||
*
|
||||
@@ -49,7 +49,7 @@ public class ConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Checks if the {@link Configuration} should copy values from its default {@link Configuration} directly.
|
||||
* <p />
|
||||
* <p>
|
||||
* If this is true, all values in the default Configuration will be directly copied,
|
||||
* making it impossible to distinguish between values that were set and values that
|
||||
* are provided by default. As a result, {@link ConfigurationSection#contains(java.lang.String)} will always
|
||||
@@ -64,7 +64,7 @@ public class ConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Sets if the {@link Configuration} should copy values from its default {@link Configuration} directly.
|
||||
* <p />
|
||||
* <p>
|
||||
* If this is true, all values in the default Configuration will be directly copied,
|
||||
* making it impossible to distinguish between values that were set and values that
|
||||
* are provided by default. As a result, {@link ConfigurationSection#contains(java.lang.String)} will always
|
||||
|
@@ -15,11 +15,11 @@ import org.bukkit.inventory.ItemStack;
|
||||
public interface ConfigurationSection {
|
||||
/**
|
||||
* Gets a set containing all keys in this section.
|
||||
* <p />
|
||||
* <p>
|
||||
* If deep is set to true, then this will contain all the keys within any child
|
||||
* {@link ConfigurationSection}s (and their children, etc). These will be in a
|
||||
* valid path notation for you to use.
|
||||
* <p />
|
||||
* <p>
|
||||
* If deep is set to false, then this will contain only the keys of any direct children,
|
||||
* and not their own children.
|
||||
*
|
||||
@@ -30,11 +30,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets a Map containing all keys and their values for this section.
|
||||
* <p />
|
||||
* <p>
|
||||
* If deep is set to true, then this will contain all the keys and values within
|
||||
* any child {@link ConfigurationSection}s (and their children, etc). These
|
||||
* keys will be in a valid path notation for you to use.
|
||||
* <p />
|
||||
* <p>
|
||||
* If deep is set to false, then this will contain only the keys and values of any
|
||||
* direct children, and not their own children.
|
||||
*
|
||||
@@ -45,7 +45,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if this {@link ConfigurationSection} contains the given path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the value for the requested path does not exist but a default value has
|
||||
* been specified, this will return true.
|
||||
*
|
||||
@@ -57,7 +57,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if this {@link ConfigurationSection} has a value set for the given path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the value for the requested path does not exist but a default value has
|
||||
* been specified, this will still return false.
|
||||
*
|
||||
@@ -69,12 +69,12 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the path of this {@link ConfigurationSection} from its root {@link Configuration}
|
||||
* <p />
|
||||
* <p>
|
||||
* For any {@link Configuration} themselves, this will return an empty string.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
* <p />
|
||||
* <p>
|
||||
* To retrieve the single name of this section, that is, the final part of the path
|
||||
* returned by this method, you may use {@link #getName()}.
|
||||
*
|
||||
@@ -84,7 +84,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the name of this individual {@link ConfigurationSection}, in the path.
|
||||
* <p />
|
||||
* <p>
|
||||
* This will always be the final part of {@link #getCurrentPath()}, unless the
|
||||
* section is orphaned.
|
||||
*
|
||||
@@ -94,9 +94,9 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the root {@link Configuration} that contains this {@link ConfigurationSection}
|
||||
* <p />
|
||||
* <p>
|
||||
* For any {@link Configuration} themselves, this will return its own object.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
*
|
||||
@@ -107,9 +107,9 @@ public interface ConfigurationSection {
|
||||
/**
|
||||
* Gets the parent {@link ConfigurationSection} that directly contains this
|
||||
* {@link ConfigurationSection}.
|
||||
* <p />
|
||||
* <p>
|
||||
* For any {@link Configuration} themselves, this will return null.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
*
|
||||
@@ -119,7 +119,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested Object by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
@@ -131,7 +131,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested Object by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the Object does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@@ -143,10 +143,10 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Sets the specified path to the given value.
|
||||
* <p />
|
||||
* <p>
|
||||
* If value is null, the entry will be removed. Any existing entry will be
|
||||
* replaced, regardless of what the new value is.
|
||||
* <p />
|
||||
* <p>
|
||||
* Some implementations may have limitations on what you may store. See their
|
||||
* individual javadocs for details. No implementations should allow you to store
|
||||
* {@link Configuration}s or {@link ConfigurationSection}s, please use
|
||||
@@ -159,7 +159,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Creates an empty {@link ConfigurationSection} at the specified path.
|
||||
* <p />
|
||||
* <p>
|
||||
* Any value that was previously set at this path will be overwritten. If the
|
||||
* previous value was itself a {@link ConfigurationSection}, it will be orphaned.
|
||||
*
|
||||
@@ -170,7 +170,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Creates a {@link ConfigurationSection} at the specified path, with specified values.
|
||||
* <p />
|
||||
* <p>
|
||||
* Any value that was previously set at this path will be overwritten. If the
|
||||
* previous value was itself a {@link ConfigurationSection}, it will be orphaned.
|
||||
*
|
||||
@@ -183,7 +183,7 @@ public interface ConfigurationSection {
|
||||
// Primitives
|
||||
/**
|
||||
* Gets the requested String by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
@@ -195,7 +195,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested String by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the String does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@@ -207,7 +207,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a String.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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
|
||||
@@ -220,7 +220,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested int by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
@@ -232,7 +232,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested int by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the int does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@@ -244,7 +244,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is an int.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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
|
||||
@@ -257,7 +257,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested boolean by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
@@ -269,7 +269,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested boolean by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the boolean does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@@ -281,7 +281,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a boolean.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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
|
||||
@@ -294,7 +294,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested double by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
@@ -306,7 +306,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested double by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the double does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@@ -318,7 +318,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a double.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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
|
||||
@@ -331,7 +331,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested long by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
@@ -343,7 +343,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested long by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the long does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@@ -355,7 +355,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a long.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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
|
||||
@@ -369,7 +369,7 @@ public interface ConfigurationSection {
|
||||
// Java
|
||||
/**
|
||||
* Gets the requested List by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
@@ -381,7 +381,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the List does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@@ -393,7 +393,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a List.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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
|
||||
@@ -406,11 +406,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of String by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a String if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@@ -421,11 +421,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Integer by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Integer if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@@ -436,11 +436,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Boolean by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Boolean if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@@ -451,11 +451,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Double by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Double if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@@ -466,11 +466,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Float by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Float if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@@ -481,11 +481,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Long by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Long if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@@ -496,11 +496,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Byte by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Byte if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@@ -511,11 +511,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Character by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Character if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@@ -526,11 +526,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Short by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Short if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@@ -541,11 +541,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Maps by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Map if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@@ -557,7 +557,7 @@ public interface ConfigurationSection {
|
||||
// Bukkit
|
||||
/**
|
||||
* Gets the requested Vector by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
@@ -569,7 +569,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested {@link Vector} by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the Vector does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@@ -581,7 +581,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a Vector.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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
|
||||
@@ -594,7 +594,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested OfflinePlayer by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
@@ -606,7 +606,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested {@link OfflinePlayer} by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the OfflinePlayer does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@@ -618,7 +618,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is an OfflinePlayer.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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
|
||||
@@ -631,7 +631,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested ItemStack by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
@@ -643,7 +643,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested {@link ItemStack} by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the ItemStack does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@@ -655,7 +655,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is an ItemStack.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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
|
||||
@@ -668,7 +668,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested Color by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
@@ -680,7 +680,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested {@link Color} by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the Color does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@@ -692,7 +692,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a Color.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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
|
||||
@@ -705,7 +705,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested ConfigurationSection by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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.
|
||||
@@ -717,7 +717,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a ConfigurationSection.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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
|
||||
@@ -730,7 +730,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the equivalent {@link ConfigurationSection} from the default {@link Configuration} defined in {@link #getRoot()}.
|
||||
* <p />
|
||||
* <p>
|
||||
* 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 {@link ConfigurationSection} then
|
||||
* this will return null.
|
||||
@@ -741,13 +741,13 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Sets the default value in the root at the given path as provided.
|
||||
* <p />
|
||||
* <p>
|
||||
* If no source {@link Configuration} was provided as a default collection,
|
||||
* then a new {@link MemoryConfiguration} will be created to hold the new default
|
||||
* value.
|
||||
* <p />
|
||||
* <p>
|
||||
* If value is null, the value will be removed from the default Configuration source.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the value as returned by {@link #getDefaultSection()} is null,
|
||||
* then this will create a new section at the path, replacing anything that
|
||||
* may have existed there previously.
|
||||
|
@@ -27,7 +27,7 @@ public class MemorySection implements ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Creates an empty MemorySection for use as a root {@link Configuration} section.
|
||||
* <p />
|
||||
* <p>
|
||||
* Note that calling this without being yourself a {@link Configuration} will throw an
|
||||
* exception!
|
||||
*
|
||||
@@ -746,7 +746,7 @@ public class MemorySection implements ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Creates a full path to the given {@link ConfigurationSection} from its root {@link Configuration}.
|
||||
* <p />
|
||||
* <p>
|
||||
* You may use this method for any given {@link ConfigurationSection}, not only {@link MemorySection}.
|
||||
*
|
||||
* @param section Section to create a path for.
|
||||
@@ -759,7 +759,7 @@ public class MemorySection implements ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Creates a relative path to the given {@link ConfigurationSection} from the given relative section.
|
||||
* <p />
|
||||
* <p>
|
||||
* You may use this method for any given {@link ConfigurationSection}, not only {@link MemorySection}.
|
||||
*
|
||||
* @param section Section to create a path for.
|
||||
|
@@ -38,7 +38,7 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Saves this {@link FileConfiguration} to the specified location.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the file does not exist, it will be created. If already exists, it will
|
||||
* be overwritten. If it cannot be overwritten or created, an exception will be thrown.
|
||||
*
|
||||
@@ -64,7 +64,7 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Saves this {@link FileConfiguration} to the specified location.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the file does not exist, it will be created. If already exists, it will
|
||||
* be overwritten. If it cannot be overwritten or created, an exception will be thrown.
|
||||
*
|
||||
@@ -87,10 +87,10 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Loads this {@link FileConfiguration} from the specified location.
|
||||
* <p />
|
||||
* <p>
|
||||
* All the values contained within this configuration will be removed, leaving
|
||||
* only settings and defaults, and the new values will be loaded from the given file.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the file cannot be loaded for any reason, an exception will be thrown.
|
||||
*
|
||||
* @param file File to load from.
|
||||
@@ -107,7 +107,7 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Loads this {@link FileConfiguration} from the specified stream.
|
||||
* <p />
|
||||
* <p>
|
||||
* All the values contained within this configuration will be removed, leaving
|
||||
* only settings and defaults, and the new values will be loaded from the given stream.
|
||||
*
|
||||
@@ -140,10 +140,10 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Loads this {@link FileConfiguration} from the specified location.
|
||||
* <p />
|
||||
* <p>
|
||||
* All the values contained within this configuration will be removed, leaving
|
||||
* only settings and defaults, and the new values will be loaded from the given file.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the file cannot be loaded for any reason, an exception will be thrown.
|
||||
*
|
||||
* @param file File to load from.
|
||||
@@ -160,10 +160,10 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Loads this {@link FileConfiguration} from the specified string, as opposed to from file.
|
||||
* <p />
|
||||
* <p>
|
||||
* All the values contained within this configuration will be removed, leaving
|
||||
* only settings and defaults, and the new values will be loaded from the given string.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the string is invalid in any way, an exception will be thrown.
|
||||
*
|
||||
* @param contents Contents of a Configuration to load.
|
||||
@@ -174,7 +174,7 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Compiles the header for this {@link FileConfiguration} and returns the result.
|
||||
* <p />
|
||||
* <p>
|
||||
* This will use the header from {@link #options()} -> {@link FileConfigurationOptions#header()},
|
||||
* respecting the rules of {@link FileConfigurationOptions#copyHeader()} if set.
|
||||
*
|
||||
|
@@ -32,12 +32,12 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Gets the header that will be applied to the top of the saved output.
|
||||
* <p />
|
||||
* <p>
|
||||
* This header will be commented out and applied directly at the top of the
|
||||
* generated output of the {@link FileConfiguration}. It is not required to
|
||||
* include a newline at the end of the header as it will automatically be applied,
|
||||
* but you may include one if you wish for extra spacing.
|
||||
* <p />
|
||||
* <p>
|
||||
* Null is a valid value which will indicate that no header is to be applied.
|
||||
* The default value is null.
|
||||
*
|
||||
@@ -49,12 +49,12 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Sets the header that will be applied to the top of the saved output.
|
||||
* <p />
|
||||
* <p>
|
||||
* This header will be commented out and applied directly at the top of the
|
||||
* generated output of the {@link FileConfiguration}. It is not required to
|
||||
* include a newline at the end of the header as it will automatically be applied,
|
||||
* but you may include one if you wish for extra spacing.
|
||||
* <p />
|
||||
* <p>
|
||||
* Null is a valid value which will indicate that no header is to be applied.
|
||||
*
|
||||
* @param value New header
|
||||
@@ -67,15 +67,15 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Gets whether or not the header should be copied from a default source.
|
||||
* <p />
|
||||
* <p>
|
||||
* If this is true, if a default {@link FileConfiguration} is passed to
|
||||
* {@link FileConfiguration#setDefaults(org.bukkit.configuration.Configuration)}
|
||||
* then upon saving it will use the header from that config, instead of the one provided here.
|
||||
* <p />
|
||||
* <p>
|
||||
* If no default is set on the configuration, or the default is not of type FileConfiguration,
|
||||
* or that config has no header ({@link #header()} returns null) then the header
|
||||
* specified in this configuration will be used.
|
||||
* <p />
|
||||
* <p>
|
||||
* Defaults to true.
|
||||
*
|
||||
* @return Whether or not to copy the header
|
||||
@@ -86,15 +86,15 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Sets whether or not the header should be copied from a default source.
|
||||
* <p />
|
||||
* <p>
|
||||
* If this is true, if a default {@link FileConfiguration} is passed to
|
||||
* {@link FileConfiguration#setDefaults(org.bukkit.configuration.Configuration)}
|
||||
* then upon saving it will use the header from that config, instead of the one provided here.
|
||||
* <p />
|
||||
* <p>
|
||||
* If no default is set on the configuration, or the default is not of type FileConfiguration,
|
||||
* or that config has no header ({@link #header()} returns null) then the header
|
||||
* specified in this configuration will be used.
|
||||
* <p />
|
||||
* <p>
|
||||
* Defaults to true.
|
||||
*
|
||||
* @param value Whether or not to copy the header
|
||||
|
@@ -158,7 +158,7 @@ public class YamlConfiguration extends FileConfiguration {
|
||||
|
||||
/**
|
||||
* Creates a new {@link YamlConfiguration}, loading from the given file.
|
||||
* <p />
|
||||
* <p>
|
||||
* Any errors loading the Configuration will be logged and then ignored.
|
||||
* If the specified input is not a valid config, a blank config will be returned.
|
||||
*
|
||||
@@ -185,7 +185,7 @@ public class YamlConfiguration extends FileConfiguration {
|
||||
|
||||
/**
|
||||
* Creates a new {@link YamlConfiguration}, loading from the given stream.
|
||||
* <p />
|
||||
* <p>
|
||||
* Any errors loading the Configuration will be logged and then ignored.
|
||||
* If the specified input is not a valid config, a blank config will be returned.
|
||||
*
|
||||
|
@@ -43,7 +43,7 @@ public class YamlConfigurationOptions extends FileConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Gets how much spaces should be used to indent each line.
|
||||
* <p />
|
||||
* <p>
|
||||
* The minimum value this may be is 2, and the maximum is 9.
|
||||
*
|
||||
* @return How much to indent by
|
||||
@@ -54,7 +54,7 @@ public class YamlConfigurationOptions extends FileConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Sets how much spaces should be used to indent each line.
|
||||
* <p />
|
||||
* <p>
|
||||
* The minimum value this may be is 2, and the maximum is 9.
|
||||
*
|
||||
* @param value New indent
|
||||
|
@@ -4,7 +4,7 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* Represents an object that may be serialized.
|
||||
* <p />
|
||||
* <p>
|
||||
* These objects MUST implement one of the following, in addition to the methods
|
||||
* as defined by this interface:
|
||||
* <ul>
|
||||
@@ -22,7 +22,7 @@ import java.util.Map;
|
||||
public interface ConfigurationSerializable {
|
||||
/**
|
||||
* Creates a Map representation of this class.
|
||||
* <p />
|
||||
* <p>
|
||||
* This class must provide a method to restore this class, as defined in the
|
||||
* {@link ConfigurationSerializable} interface javadocs.
|
||||
*
|
||||
|
@@ -135,10 +135,10 @@ public class ConfigurationSerialization {
|
||||
|
||||
/**
|
||||
* Attempts to deserialize the given arguments into a new instance of the given class.
|
||||
* <p />
|
||||
* <p>
|
||||
* The class must implement {@link ConfigurationSerializable}, including the extra methods
|
||||
* as specified in the javadoc of ConfigurationSerializable.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a new instance could not be made, an example being the class not fully implementing
|
||||
* the interface, null will be returned.
|
||||
*
|
||||
@@ -152,10 +152,10 @@ public class ConfigurationSerialization {
|
||||
|
||||
/**
|
||||
* Attempts to deserialize the given arguments into a new instance of the given class.
|
||||
* <p />
|
||||
* <p>
|
||||
* The class must implement {@link ConfigurationSerializable}, including the extra methods
|
||||
* as specified in the javadoc of ConfigurationSerializable.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a new instance could not be made, an example being the class not fully implementing
|
||||
* the interface, null will be returned.
|
||||
*
|
||||
|
@@ -9,10 +9,10 @@ import java.lang.annotation.Target;
|
||||
* Represents an "alias" that a {@link ConfigurationSerializable} may be stored as.
|
||||
* If this is not present on a {@link ConfigurationSerializable} class, it will use the
|
||||
* fully qualified name of the class.
|
||||
* <p />
|
||||
* <p>
|
||||
* This value will be stored in the configuration so that the configuration deserialization
|
||||
* can determine what type it is.
|
||||
* <p />
|
||||
* <p>
|
||||
* Using this annotation on any other class than a {@link ConfigurationSerializable} will
|
||||
* have no effect.
|
||||
* @see ConfigurationSerialization#registerClass(Class, String)
|
||||
@@ -22,7 +22,7 @@ import java.lang.annotation.Target;
|
||||
public @interface SerializableAs {
|
||||
/**
|
||||
* This is the name your class will be stored and retrieved as.
|
||||
* <p />
|
||||
* <p>
|
||||
* This name MUST be unique. We recommend using names such as "MyPluginThing" instead of
|
||||
* "Thing".
|
||||
*
|
||||
|
Reference in New Issue
Block a user