From 062a3df78d228bfad2cb3bb84e1b900893a0197e Mon Sep 17 00:00:00 2001 From: feildmaster Date: Sun, 3 Jun 2012 05:40:54 -0500 Subject: Javadoc updates Fixes BUKKIT-1653, Fixes BUKKIT-1383 and Fixes BUKKIT-1644 --- src/main/java/org/bukkit/Effect.java | 2 +- src/main/java/org/bukkit/EntityEffect.java | 8 +- src/main/java/org/bukkit/OfflinePlayer.java | 6 +- src/main/java/org/bukkit/Server.java | 2 +- src/main/java/org/bukkit/World.java | 4 +- src/main/java/org/bukkit/WorldCreator.java | 18 +-- src/main/java/org/bukkit/block/Block.java | 20 ++- src/main/java/org/bukkit/block/Dispenser.java | 4 +- src/main/java/org/bukkit/block/NoteBlock.java | 4 +- .../org/bukkit/configuration/Configuration.java | 16 +-- .../bukkit/configuration/ConfigurationOptions.java | 8 +- .../bukkit/configuration/ConfigurationSection.java | 148 ++++++++++----------- .../org/bukkit/configuration/MemorySection.java | 6 +- .../configuration/file/FileConfiguration.java | 20 +-- .../file/FileConfigurationOptions.java | 20 +-- .../configuration/file/YamlConfiguration.java | 9 +- .../file/YamlConfigurationOptions.java | 4 +- .../serialization/ConfigurationSerializable.java | 4 +- .../serialization/ConfigurationSerialization.java | 8 +- .../serialization/SerializableAs.java | 6 +- .../bukkit/conversations/ConversationContext.java | 1 + .../bukkit/conversations/ConversationFactory.java | 3 +- .../org/bukkit/conversations/MessagePrompt.java | 2 +- .../java/org/bukkit/enchantments/Enchantment.java | 2 +- src/main/java/org/bukkit/entity/Entity.java | 6 +- src/main/java/org/bukkit/entity/LivingEntity.java | 2 +- src/main/java/org/bukkit/entity/Player.java | 14 +- .../bukkit/event/entity/CreatureSpawnEvent.java | 2 +- .../org/bukkit/event/entity/EntityDeathEvent.java | 4 +- .../org/bukkit/event/entity/PlayerDeathEvent.java | 8 +- .../java/org/bukkit/generator/ChunkGenerator.java | 48 +++++-- src/main/java/org/bukkit/inventory/Inventory.java | 4 +- .../java/org/bukkit/inventory/InventoryView.java | 2 +- src/main/java/org/bukkit/inventory/ItemStack.java | 18 +-- src/main/java/org/bukkit/plugin/Plugin.java | 2 +- .../org/bukkit/plugin/messaging/Messenger.java | 2 +- .../plugin/messaging/PluginMessageListener.java | 2 +- .../plugin/messaging/PluginMessageRecipient.java | 2 +- .../java/org/bukkit/potion/PotionEffectType.java | 2 +- 39 files changed, 232 insertions(+), 211 deletions(-) (limited to 'src/main') diff --git a/src/main/java/org/bukkit/Effect.java b/src/main/java/org/bukkit/Effect.java index e57a3a71..175750fa 100644 --- a/src/main/java/org/bukkit/Effect.java +++ b/src/main/java/org/bukkit/Effect.java @@ -64,7 +64,7 @@ public enum Effect { */ SMOKE(2000, Type.VISUAL, BlockFace.class), /** - * Visual effect of a block breaking. Needs block ID as additional info. + * Sound of a block breaking. Needs block ID as additional info. */ STEP_SOUND(2001, Type.SOUND, Material.class), /** diff --git a/src/main/java/org/bukkit/EntityEffect.java b/src/main/java/org/bukkit/EntityEffect.java index 82d96f67..00a46482 100644 --- a/src/main/java/org/bukkit/EntityEffect.java +++ b/src/main/java/org/bukkit/EntityEffect.java @@ -16,28 +16,28 @@ public enum EntityEffect { /** * When a mob dies. - *

+ *

* This will cause client-glitches! */ DEATH(3), /** * The smoke when taming a wolf fails. - *

+ *

* Without client-mods this will be ignored if the entity is not a wolf. */ WOLF_SMOKE(6), /** * The hearts when taming a wolf succeeds. - *

+ *

* Without client-mods this will be ignored if the entity is not a wolf. */ WOLF_HEARTS(7), /** * When a wolf shakes (after being wet). - *

+ *

* Without client-mods this will be ignored if the entity is not a wolf. */ WOLF_SHAKE(8), diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java index 013dc0a2..91467713 100644 --- a/src/main/java/org/bukkit/OfflinePlayer.java +++ b/src/main/java/org/bukkit/OfflinePlayer.java @@ -50,7 +50,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio /** * Gets a {@link Player} object that this represents, if there is one - *

+ *

* If the player is online, this will return that player. Otherwise, * it will return null. * @@ -60,7 +60,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio /** * Gets the first date and time that this player was witnessed on this server. - *

+ *

* If the player has never played before, this will return 0. Otherwise, it will be * the amount of milliseconds since midnight, January 1, 1970 UTC. * @@ -70,7 +70,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio /** * Gets the last date and time that this player was witnessed on this server. - *

+ *

* If the player has never played before, this will return 0. Otherwise, it will be * the amount of milliseconds since midnight, January 1, 1970 UTC. * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java index 119685a5..9377d0cd 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -304,7 +304,7 @@ public interface Server extends PluginMessageRecipient { /** * Creates or loads a world with the given name using the specified options. - *

+ *

* If the world is already loaded, it will just return the equivalent of * getWorld(creator.name()). * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index dae10d78..4fa3b179 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -430,7 +430,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * Sets the relative in-game time on the server. *

* The relative time is analogous to hours * 1000 - *

+ *

* Note that setting the relative time below the current relative time will * actually move the clock forward a day. If you require to rewind time, please * see setFullTime @@ -450,7 +450,7 @@ public interface World extends PluginMessageRecipient, Metadatable { /** * Sets the in-game time on the server - *

+ *

* Note that this sets the full time of the world, which may cause adverse * effects such as breaking redstone clocks and any scheduled events * diff --git a/src/main/java/org/bukkit/WorldCreator.java b/src/main/java/org/bukkit/WorldCreator.java index 8bfbb262..3fde7d2d 100644 --- a/src/main/java/org/bukkit/WorldCreator.java +++ b/src/main/java/org/bukkit/WorldCreator.java @@ -140,7 +140,7 @@ public class WorldCreator { /** * Gets the generator that will be used to create or load the world. - *

+ *

* This may be null, in which case the "natural" generator for this environment * will be used. * @@ -152,7 +152,7 @@ public class WorldCreator { /** * Sets the generator that will be used to create or load the world. - *

+ *

* This may be null, in which case the "natural" generator for this environment * will be used. * @@ -167,10 +167,10 @@ public class WorldCreator { /** * Sets the generator that will be used to create or load the world. - *

+ *

* This may be null, in which case the "natural" generator for this environment * will be used. - *

+ *

* If the generator cannot be found for the given name, the natural environment generator * will be used instead and a warning will be printed to the console. * @@ -185,10 +185,10 @@ public class WorldCreator { /** * Sets the generator that will be used to create or load the world. - *

+ *

* This may be null, in which case the "natural" generator for this environment * will be used. - *

+ *

* If the generator cannot be found for the given name, the natural environment generator * will be used instead and a warning will be printed to the specified output * @@ -225,7 +225,7 @@ public class WorldCreator { /** * Creates a world with the specified options. - *

+ *

* If the world already exists, it will be loaded from disk and some options * may be ignored. * @@ -247,10 +247,10 @@ public class WorldCreator { /** * Attempts to get the {@link ChunkGenerator} with the given name. - *

+ *

* If the generator is not found, null will be returned and a message will be * printed to the specified {@link CommandSender} explaining why. - *

+ *

* The name must be in the "plugin:id" notation, or optionally just "plugin", * where "plugin" is the safe-name of a plugin and "id" is an optional unique * identifier for the generator you wish to request from the plugin. diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java index 3aca0c82..ffc20d81 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -35,8 +35,8 @@ public interface Block extends Metadatable { Block getRelative(int modX, int modY, int modZ); /** - * Gets the block at the given face
- *
+ * Gets the block at the given face + *

* This method is equal to getRelative(face, 1) * * @param face Face of this block to return @@ -46,14 +46,14 @@ public interface Block extends Metadatable { Block getRelative(BlockFace face); /** - * Gets the block at the given distance of the given face
- *
+ * Gets the block at the given distance of the given face + *

* For example, the following method places water at 100,102,100; two blocks * above 100,100,100. * *

      * Block block = world.getBlockAt(100, 100, 100);
-     * Block shower = block.getFace(BlockFace.UP, 2);
+     * Block shower = block.getRelative(BlockFace.UP, 2);
      * shower.setType(Material.WATER);
      * 
* @@ -86,7 +86,7 @@ public interface Block extends Metadatable { /** * Get the amount of light at this block from the sky. - *

+ *

* Any light given from other sources (such as blocks like torches) will be ignored. * * @return Sky light level @@ -95,7 +95,7 @@ public interface Block extends Metadatable { /** * Get the amount of light at this block from nearby blocks. - *

+ *

* Any light given from other sources (such as the sun) will be ignored. * * @return Block light level @@ -194,17 +194,15 @@ public interface Block extends Metadatable { boolean setTypeIdAndData(int type, byte data, boolean applyPhysics); /** - * Gets the face relation of this block compared to the given block
- *
+ * Gets the face relation of this block compared to the given block + *

* For example: - * *

      * Block current = world.getBlockAt(100, 100, 100);
      * Block target = world.getBlockAt(100, 101, 100);
      *
      * current.getFace(target) == BlockFace.Up;
      * 
- * *
* If the given block is not connected to this block, null may be returned * diff --git a/src/main/java/org/bukkit/block/Dispenser.java b/src/main/java/org/bukkit/block/Dispenser.java index 5df5b19e..293772a2 100644 --- a/src/main/java/org/bukkit/block/Dispenser.java +++ b/src/main/java/org/bukkit/block/Dispenser.java @@ -6,8 +6,8 @@ package org.bukkit.block; public interface Dispenser extends BlockState, ContainerBlock { /** - * Attempts to dispense the contents of this block
- *
+ * Attempts to dispense the contents of this block + *

* If the block is no longer a dispenser, this will return false * * @return true if successful, otherwise false diff --git a/src/main/java/org/bukkit/block/NoteBlock.java b/src/main/java/org/bukkit/block/NoteBlock.java index ffe5af65..fa7ebc7d 100644 --- a/src/main/java/org/bukkit/block/NoteBlock.java +++ b/src/main/java/org/bukkit/block/NoteBlock.java @@ -37,8 +37,8 @@ public interface NoteBlock extends BlockState { public void setRawNote(byte note); /** - * Attempts to play the note at block
- *
+ * Attempts to play the note at block + *

* If the block is no longer a note block, this will return false * * @return true if successful, otherwise false diff --git a/src/main/java/org/bukkit/configuration/Configuration.java b/src/main/java/org/bukkit/configuration/Configuration.java index 6fa80186..ef887cff 100644 --- a/src/main/java/org/bukkit/configuration/Configuration.java +++ b/src/main/java/org/bukkit/configuration/Configuration.java @@ -8,11 +8,11 @@ import java.util.Map; public interface Configuration extends ConfigurationSection { /** * Sets the default value of the given path as provided. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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}. - *

+ *

* 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. - *

+ *

* 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}. - *

+ *

* All setters through this method are chainable. * * @return Options for this configuration diff --git a/src/main/java/org/bukkit/configuration/ConfigurationOptions.java b/src/main/java/org/bukkit/configuration/ConfigurationOptions.java index 73ca421c..fbfe7feb 100644 --- a/src/main/java/org/bukkit/configuration/ConfigurationOptions.java +++ b/src/main/java/org/bukkit/configuration/ConfigurationOptions.java @@ -23,7 +23,7 @@ public class ConfigurationOptions { /** * Gets the char that will be used to separate {@link ConfigurationSection}s - *

+ *

* 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 - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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 diff --git a/src/main/java/org/bukkit/configuration/ConfigurationSection.java b/src/main/java/org/bukkit/configuration/ConfigurationSection.java index f089c5df..c5a2a4c3 100644 --- a/src/main/java/org/bukkit/configuration/ConfigurationSection.java +++ b/src/main/java/org/bukkit/configuration/ConfigurationSection.java @@ -13,11 +13,11 @@ import org.bukkit.inventory.ItemStack; public interface ConfigurationSection { /** * 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 * {@link ConfigurationSection}s (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. * @@ -28,11 +28,11 @@ public interface ConfigurationSection { /** * 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 {@link ConfigurationSection}s (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. * @@ -43,7 +43,7 @@ public interface ConfigurationSection { /** * Checks if this {@link 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. * @@ -55,7 +55,7 @@ public interface ConfigurationSection { /** * Checks if this {@link 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. * @@ -67,12 +67,12 @@ public interface ConfigurationSection { /** * Gets the path of this {@link ConfigurationSection} from its root {@link Configuration} - *

+ *

* For any {@link 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 {@link #getName()}. * @@ -82,7 +82,7 @@ public interface ConfigurationSection { /** * Gets the name of this individual {@link ConfigurationSection}, in the path. - *

+ *

* This will always be the final part of {@link #getCurrentPath()}, unless the * section is orphaned. * @@ -92,9 +92,9 @@ public interface ConfigurationSection { /** * Gets the root {@link Configuration} that contains this {@link ConfigurationSection} - *

+ *

* For any {@link 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. * @@ -105,9 +105,9 @@ public interface ConfigurationSection { /** * Gets the parent {@link ConfigurationSection} that directly contains this * {@link ConfigurationSection}. - *

+ *

* For any {@link 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. * @@ -117,7 +117,7 @@ public interface ConfigurationSection { /** * 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. @@ -129,7 +129,7 @@ public interface ConfigurationSection { /** * 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 {@link Configuration}. * @@ -141,10 +141,10 @@ public interface ConfigurationSection { /** * 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 * {@link Configuration}s or {@link ConfigurationSection}s, please use @@ -157,7 +157,7 @@ public interface ConfigurationSection { /** * Creates an empty {@link ConfigurationSection} at the specified path. - *

+ *

* 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. * @@ -168,7 +168,7 @@ public interface ConfigurationSection { /** * Creates a {@link 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 {@link ConfigurationSection}, it will be orphaned. * @@ -181,7 +181,7 @@ public interface ConfigurationSection { // Primitives /** * 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. @@ -193,7 +193,7 @@ public interface ConfigurationSection { /** * 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 {@link Configuration}. * @@ -205,7 +205,7 @@ public interface ConfigurationSection { /** * 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 @@ -218,10 +218,10 @@ public interface ConfigurationSection { /** * 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 null. + * value was specified, this will return 0. * * @param path Path of the int to get. * @return Requested int. @@ -230,7 +230,7 @@ public interface ConfigurationSection { /** * 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 {@link Configuration}. * @@ -242,7 +242,7 @@ public interface ConfigurationSection { /** * 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 @@ -255,7 +255,7 @@ public interface ConfigurationSection { /** * 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. @@ -267,7 +267,7 @@ public interface ConfigurationSection { /** * 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 {@link Configuration}. * @@ -279,7 +279,7 @@ public interface ConfigurationSection { /** * 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 @@ -292,7 +292,7 @@ public interface ConfigurationSection { /** * 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 null. @@ -304,7 +304,7 @@ public interface ConfigurationSection { /** * 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 {@link Configuration}. * @@ -316,7 +316,7 @@ public interface ConfigurationSection { /** * 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 @@ -329,7 +329,7 @@ public interface ConfigurationSection { /** * 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 null. @@ -341,7 +341,7 @@ public interface ConfigurationSection { /** * 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 {@link Configuration}. * @@ -353,7 +353,7 @@ public interface ConfigurationSection { /** * 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 @@ -367,7 +367,7 @@ public interface ConfigurationSection { // Java /** * 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. @@ -379,7 +379,7 @@ public interface ConfigurationSection { /** * 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 {@link Configuration}. * @@ -391,7 +391,7 @@ public interface ConfigurationSection { /** * 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 @@ -404,11 +404,11 @@ public interface ConfigurationSection { /** * 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 null. - *

+ *

* This method will attempt to cast any values into a String if possible, but may * miss any values out if they are not compatible. * @@ -419,11 +419,11 @@ public interface ConfigurationSection { /** * 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 null. - *

+ *

* This method will attempt to cast any values into a Integer if possible, but may * miss any values out if they are not compatible. * @@ -434,11 +434,11 @@ public interface ConfigurationSection { /** * 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 null. - *

+ *

* This method will attempt to cast any values into a Boolean if possible, but may * miss any values out if they are not compatible. * @@ -449,11 +449,11 @@ public interface ConfigurationSection { /** * 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 null. - *

+ *

* This method will attempt to cast any values into a Double if possible, but may * miss any values out if they are not compatible. * @@ -464,11 +464,11 @@ public interface ConfigurationSection { /** * 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 null. - *

+ *

* This method will attempt to cast any values into a Float if possible, but may * miss any values out if they are not compatible. * @@ -479,11 +479,11 @@ public interface ConfigurationSection { /** * 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 null. - *

+ *

* This method will attempt to cast any values into a Long if possible, but may * miss any values out if they are not compatible. * @@ -494,11 +494,11 @@ public interface ConfigurationSection { /** * 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 null. - *

+ *

* This method will attempt to cast any values into a Byte if possible, but may * miss any values out if they are not compatible. * @@ -509,11 +509,11 @@ public interface ConfigurationSection { /** * 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 null. - *

+ *

* This method will attempt to cast any values into a Character if possible, but may * miss any values out if they are not compatible. * @@ -524,11 +524,11 @@ public interface ConfigurationSection { /** * 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 null. - *

+ *

* This method will attempt to cast any values into a Short if possible, but may * miss any values out if they are not compatible. * @@ -539,11 +539,11 @@ public interface ConfigurationSection { /** * 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 null. - *

+ *

* This method will attempt to cast any values into a Map if possible, but may * miss any values out if they are not compatible. * @@ -555,7 +555,7 @@ public interface ConfigurationSection { // Bukkit /** * 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. @@ -567,7 +567,7 @@ public interface ConfigurationSection { /** * Gets the requested {@link 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 {@link Configuration}. * @@ -579,7 +579,7 @@ public interface ConfigurationSection { /** * 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 @@ -592,7 +592,7 @@ public interface ConfigurationSection { /** * 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. @@ -604,7 +604,7 @@ public interface ConfigurationSection { /** * Gets the requested {@link 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 {@link Configuration}. * @@ -616,7 +616,7 @@ public interface ConfigurationSection { /** * 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 @@ -629,7 +629,7 @@ public interface ConfigurationSection { /** * 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. @@ -641,7 +641,7 @@ public interface ConfigurationSection { /** * Gets the requested {@link 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 {@link Configuration}. * @@ -653,7 +653,7 @@ public interface ConfigurationSection { /** * 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 @@ -666,7 +666,7 @@ public interface ConfigurationSection { /** * 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. @@ -678,7 +678,7 @@ public interface ConfigurationSection { /** * 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 @@ -691,7 +691,7 @@ public interface ConfigurationSection { /** * Gets the equivalent {@link ConfigurationSection} from the default {@link Configuration} defined in {@link #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 {@link ConfigurationSection} then * this will return null. @@ -702,13 +702,13 @@ public interface ConfigurationSection { /** * Sets the default value in the root at the given path as provided. - *

+ *

* 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. - *

+ *

* If value is null, the value will be removed from the default Configuration source. - *

+ *

* 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. diff --git a/src/main/java/org/bukkit/configuration/MemorySection.java b/src/main/java/org/bukkit/configuration/MemorySection.java index 24a317e9..f4a9592e 100644 --- a/src/main/java/org/bukkit/configuration/MemorySection.java +++ b/src/main/java/org/bukkit/configuration/MemorySection.java @@ -24,7 +24,7 @@ public class MemorySection implements ConfigurationSection { /** * Creates an empty MemorySection for use as a root {@link Configuration} section. - *

+ *

* Note that calling this without being yourself a {@link Configuration} will throw an * exception! * @@ -728,7 +728,7 @@ public class MemorySection implements ConfigurationSection { /** * Creates a full path to the given {@link ConfigurationSection} from its root {@link Configuration}. - *

+ *

* You may use this method for any given {@link ConfigurationSection}, not only {@link MemorySection}. * * @param section Section to create a path for. @@ -741,7 +741,7 @@ public class MemorySection implements ConfigurationSection { /** * Creates a relative path to the given {@link ConfigurationSection} from the given relative section. - *

+ *

* You may use this method for any given {@link ConfigurationSection}, not only {@link MemorySection}. * * @param section Section to create a path for. diff --git a/src/main/java/org/bukkit/configuration/file/FileConfiguration.java b/src/main/java/org/bukkit/configuration/file/FileConfiguration.java index 33aac313..087b2688 100644 --- a/src/main/java/org/bukkit/configuration/file/FileConfiguration.java +++ b/src/main/java/org/bukkit/configuration/file/FileConfiguration.java @@ -38,7 +38,7 @@ public abstract class FileConfiguration extends MemoryConfiguration { /** * Saves this {@link FileConfiguration} to the specified location. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* This will use the header from {@link #options()} -> {@link FileConfigurationOptions#header()}, * respecting the rules of {@link FileConfigurationOptions#copyHeader()} if set. * diff --git a/src/main/java/org/bukkit/configuration/file/FileConfigurationOptions.java b/src/main/java/org/bukkit/configuration/file/FileConfigurationOptions.java index 3d225443..7efc6cbc 100644 --- a/src/main/java/org/bukkit/configuration/file/FileConfigurationOptions.java +++ b/src/main/java/org/bukkit/configuration/file/FileConfigurationOptions.java @@ -32,12 +32,12 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions { /** * Gets the header that will be applied to the top of the saved output. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* 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. - *

+ *

* Defaults to true. * * @param value Whether or not to copy the header diff --git a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java index 70cb7bdb..573e2566 100644 --- a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java +++ b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java @@ -19,6 +19,7 @@ import org.yaml.snakeyaml.representer.Representer; /** * An implementation of {@link Configuration} which saves all files in Yaml. + * Note that this implementation is not synchronized. */ public class YamlConfiguration extends FileConfiguration { protected static final String COMMENT_PREFIX = "# "; @@ -157,13 +158,13 @@ public class YamlConfiguration extends FileConfiguration { /** * Creates a new {@link YamlConfiguration}, loading from the given file. - *

+ *

* 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. * * @param file Input file * @return Resulting configuration - * @throws IllegalArgumentException Thrown is file is null + * @throws IllegalArgumentException Thrown if file is null */ public static YamlConfiguration loadConfiguration(File file) { Validate.notNull(file, "File cannot be null"); @@ -184,13 +185,13 @@ public class YamlConfiguration extends FileConfiguration { /** * Creates a new {@link YamlConfiguration}, loading from the given stream. - *

+ *

* 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. * * @param stream Input stream * @return Resulting configuration - * @throws IllegalArgumentException Thrown is stream is null + * @throws IllegalArgumentException Thrown if stream is null */ public static YamlConfiguration loadConfiguration(InputStream stream) { Validate.notNull(stream, "Stream cannot be null"); diff --git a/src/main/java/org/bukkit/configuration/file/YamlConfigurationOptions.java b/src/main/java/org/bukkit/configuration/file/YamlConfigurationOptions.java index d2dd712f..e726357c 100644 --- a/src/main/java/org/bukkit/configuration/file/YamlConfigurationOptions.java +++ b/src/main/java/org/bukkit/configuration/file/YamlConfigurationOptions.java @@ -43,7 +43,7 @@ public class YamlConfigurationOptions extends FileConfigurationOptions { /** * Gets how much spaces should be used to indent each line. - *

+ *

* 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. - *

+ *

* The minimum value this may be is 2, and the maximum is 9. * * @param value New indent diff --git a/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerializable.java b/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerializable.java index 7eb01549..880118f5 100644 --- a/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerializable.java +++ b/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerializable.java @@ -4,7 +4,7 @@ import java.util.Map; /** * Represents an object that may be serialized. - *

+ *

* These objects MUST implement one of the following, in addition to the methods * as defined by this interface: *