Large diffs are not rendered by default.

@@ -24,7 +24,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!
*
@@ -728,7 +728,7 @@ protected void mapChildrenValues(Map<String, Object> output, ConfigurationSectio

/**
* 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.
@@ -741,7 +741,7 @@ public static String createPath(ConfigurationSection section, String key) {

/**
* 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 FileConfiguration(Configuration defaults) {

/**
* 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 void save(File file) throws IOException {

/**
* 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 void save(String file) throws IOException {

/**
* 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 void load(File file) throws FileNotFoundException, IOException, InvalidCo

/**
* 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 void load(InputStream stream) throws IOException, InvalidConfigurationExc

/**
* 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 void load(String file) throws FileNotFoundException, IOException, Invalid

/**
* 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 void load(String file) throws FileNotFoundException, IOException, Invalid

/**
* 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 FileConfigurationOptions pathSeparator(char value) {

/**
* 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 String header() {

/**
* 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 FileConfigurationOptions header(String value) {

/**
* 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 boolean copyHeader() {

/**
* 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
@@ -19,6 +19,7 @@

/**
* 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 YamlConfigurationOptions options() {

/**
* 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.
*
* @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 static YamlConfiguration loadConfiguration(File file) {

/**
* 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.
*
* @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");
@@ -43,7 +43,7 @@ public YamlConfigurationOptions copyHeader(boolean value) {

/**
* 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 int indent() {

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

/**
* 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 @@
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.
*
@@ -129,10 +129,10 @@ public ConfigurationSerializable deserialize(Map<String, Object> args) {

/**
* 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.
*
@@ -146,10 +146,10 @@ public static ConfigurationSerializable deserializeObject(Map<String, Object> ar

/**
* 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 @@
* 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 @@
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".
*
@@ -15,6 +15,7 @@ public class ConversationContext {
private Plugin plugin;

/**
* @param plugin The owning plugin.
* @param forWhom The subject of the conversation.
* @param initialSessionData Any initial values to put in the sessionData map.
*/
@@ -29,6 +29,7 @@ public class ConversationFactory {

/**
* Constructs a ConversationFactory.
* @param plugin The plugin that owns the factory.
*/
public ConversationFactory(Plugin plugin)
{
@@ -178,7 +179,7 @@ public Conversation buildConversation(Conversable forWhom) {
for (ConversationCanceller canceller : cancellers) {
conversation.addConversationCanceller(canceller.clone());
}

//Add the ConversationAbandonedListeners
for (ConversationAbandonedListener listener : abandonedListeners) {
conversation.addConversationAbandonedListener(listener);
@@ -12,7 +12,7 @@ public MessagePrompt() {
/**
* Message prompts never wait for user input before continuing.
* @param context Context information about the conversation.
* @return
* @return Always false.
*/
public boolean blocksForInput(ConversationContext context) {
return false;
@@ -203,7 +203,7 @@ public String toString() {

/**
* Registers an enchantment with the given ID and object.
* <p>
* <p />
* Generally not to be used from within a plugin.
*
* @param enchantment Enchantment to register
@@ -203,7 +203,7 @@ public interface Entity extends Metadatable {

/**
* Gets the amount of ticks this entity has lived for.
* <p>
* <p />
* This is the equivalent to "age" in entities.
*
* @return Age of entity
@@ -212,7 +212,7 @@ public interface Entity extends Metadatable {

/**
* Sets the amount of ticks this entity has lived for.
* <p>
* <p />
* This is the equivalent to "age" in entities. May not be less than one tick.
*
* @param value Age of entity
@@ -221,7 +221,7 @@ public interface Entity extends Metadatable {

/**
* Performs the specified {@link EntityEffect} for this entity.
* <p>
* <p />
* This will be viewable to all players near the entity.
*
* @param type Effect to play.
@@ -213,7 +213,7 @@ public interface LivingEntity extends Entity {

/**
* Gets the player identified as the killer of this entity.
* <p>
* <p />
* May be null.
*
* @return Killer player, or null if none found.
@@ -49,11 +49,11 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline

/**
* Sets the name that is shown on the in-game player list.
* <p>
* <p />
* The name cannot be longer than 16 characters, but {@link ChatColor} is supported.
* <p>
* <p />
* If the value is null, the name will be identical to {@link #getName()}.
* <p>
* <p />
* This name is case sensitive and unique, two names with different casing will
* appear as two different people. If a player joins afterwards with
* a name that conflicts with a player's custom list name, the
@@ -358,7 +358,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline

/**
* Gets the players current experience points towards the next level.
* <p>
* <p />
* This is a percentage value. 0 is "no progress" and 1 is "next level".
*
* @return Current experience points
@@ -367,7 +367,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline

/**
* Sets the players current experience points towards the next level
* <p>
* <p />
* This is a percentage value. 0 is "no progress" and 1 is "next level".
*
* @param exp New experience points
@@ -404,7 +404,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline

/**
* Gets the players current exhaustion level.
* <p>
* <p />
* Exhaustion controls how fast the food level drops. While you have a certain
* amount of exhaustion, your saturation will drop to zero, and then your food
* will drop to zero.
@@ -422,7 +422,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline

/**
* Gets the players current saturation level.
* <p>
* <p />
* Saturation is a buffer for food level. Your food level will not drop if you
* are saturated > 0.
*
@@ -54,7 +54,7 @@ public Location getLocation() {
* Gets the type of creature being spawned.
*
* @return A CreatureType value detailing the type of creature being spawned
* @deprecated In favour of {@link #getSpawnedType()}.
* @deprecated In favour of {@link #getEntityType()}.
*/
@Deprecated
public CreatureType getCreatureType() {
@@ -30,7 +30,7 @@ public LivingEntity getEntity() {

/**
* Gets how much EXP should be dropped from this death.
* <p>
* <p />
* This does not indicate how much EXP should be taken from the entity in question,
* merely how much should be created after its death.
*
@@ -42,7 +42,7 @@ public int getDroppedExp() {

/**
* Sets how much EXP should be dropped from this death.
* <p>
* <p />
* This does not indicate how much EXP should be taken from the entity in question,
* merely how much should be created after its death.
*
@@ -56,7 +56,7 @@ public String getDeathMessage() {

/**
* Gets how much EXP the Player should have at respawn.
* <p>
* <p />
* This does not indicate how much EXP should be dropped, please see
* {@link #getDroppedExp()} for that.
*
@@ -68,7 +68,7 @@ public int getNewExp() {

/**
* Sets how much EXP the Player should have at respawn.
* <p>
* <p />
* This does not indicate how much EXP should be dropped, please see
* {@link #setDroppedExp(int)} for that.
*
@@ -116,7 +116,7 @@ public void setNewTotalExp(int totalExp) {

/**
* Gets if the Player should keep all EXP at respawn.
* <p>
* <p />
* This flag overrides other EXP settings
*
* @return True if Player should keep all pre-death exp
@@ -127,7 +127,7 @@ public boolean getKeepLevel() {

/**
* Sets if the Player should keep all EXP at respawn.
* <p>
* <p />
* This overrides all other EXP settings
*
* @param keepLevel True to keep all current value levels
@@ -38,8 +38,8 @@ public interface BiomeGrid {
}
@Deprecated
/**
* Shapes the chunk for the given coordinates.<br />
* <br />
* Shapes the chunk for the given coordinates.
* <p />
* This method should return a byte[32768] in the following format:
*
* <pre>
@@ -51,10 +51,10 @@ public interface BiomeGrid {
* }
* }
* </pre>
*
* <p />
* Note that this method should <b>never</b> attempt to get the Chunk at
* the passed coordinates, as doing so may cause an infinite loop
*
* <p />
* Note this deprecated method will only be called when both generateExtBlockSections()
* and generateBlockSections() are unimplemented and return null.
@@ -70,20 +70,40 @@ public byte[] generate(World world, Random random, int x, int z) {

/**
* Shapes the chunk for the given coordinates, with extended block IDs supported (0-4095).
* <p>
* <p />
* As of 1.2, chunks are represented by a vertical array of chunk sections, each of which is 16 x 16 x 16 blocks. If a section
* is empty (all zero), the section does not need to be supplied, reducing memory usage.
* <p>
* <p />
* This method must return a short[][] array in the following format:
* <pre>
* short[][] result = new short[world-height / 16][];
* </pre>
* </pre>
* Each section (sectionID = (Y>>4)) that has blocks needs to be allocated space for the 4096 blocks in that section:
* <pre>
* result[sectionID] = new short[4096];
* </pre>
* while sections that are not populated can be left null.
* <p>
* <p />
* Setting a block at X, Y, Z within the chunk can be done with the following mapping function:
* <pre>
* void setBlock(short[][] result, int x, int y, int z, short blkid) {
* if (result[y >> 4] == null) {
* result[y >> 4] = new short[4096];
* }
* result[y >> 4][((y & 0xF) << 8) | (z << 4) | x] = blkid;
* }
* </pre>
* while reading a block ID can be done with the following mapping function:
* <pre>
* short getBlock(short[][] result, int x, int y, int z) {
* if (result[y >> 4] == null) {
* return (short)0;
* }
* return result[y >> 4][((y & 0xF) << 8) | (z << 4) | x];
* }
* </pre>
* while sections that are not populated can be left null.
* <p />
* Setting a block at X, Y, Z within the chunk can be done with the following mapping function:
* <pre>
* void setBlock(short[][] result, int x, int y, int z, short blkid) {
@@ -102,10 +122,10 @@ public byte[] generate(World world, Random random, int x, int z) {
* return result[y >> 4][((y & 0xF) << 8) | (z << 4) | x];
* }
* </pre>
* <p>
* <p />
* Note that this method should <b>never</b> attempt to get the Chunk at
* the passed coordinates, as doing so may cause an infinite loop
* <p>
* <p />
* Note generators that do not return block IDs above 255 should not implement
* this method, or should have it return null (which will result in the
* generateBlockSections() method being called).
@@ -123,20 +143,20 @@ public short[][] generateExtBlockSections(World world, Random random, int x, int

/**
* Shapes the chunk for the given coordinates.
* <p>
* <p />
* As of 1.2, chunks are represented by a vertical array of chunk sections, each of which is 16 x 16 x 16 blocks. If a section
* is empty (all zero), the section does not need to be supplied, reducing memory usage.
* <p>
* <p />
* This method must return a byte[][] array in the following format:
* <pre>
* byte[][] result = new byte[world-height / 16][];
* </pre>
* </pre>
* Each section (sectionID = (Y>>4)) that has blocks needs to be allocated space for the 4096 blocks in that section:
* <pre>
* result[sectionID] = new byte[4096];
* </pre>
* while sections that are not populated can be left null.
* <p>
* <p />
* Setting a block at X, Y, Z within the chunk can be done with the following mapping function:
* <pre>
* void setBlock(byte[][] result, int x, int y, int z, byte blkid) {
@@ -27,7 +27,7 @@ public interface Inventory extends Iterable<ItemStack> {

/**
* This method allows you to change the maximum stack size for an inventory.
* <p><b>Caveats:</b>
* <p /><b>Caveats:</b>
* <ul>
* <li>Not all inventories respect this value.
* <li>Stacks larger than 127 may be clipped when the world is saved.
@@ -205,7 +205,7 @@ public interface Inventory extends Iterable<ItemStack> {
/**
* Find the first empty Slot.
*
* @return The first empty Slot found.
* @return The first empty Slot found, or -1 if no empty slots.
*/
public int firstEmpty();

@@ -88,7 +88,7 @@ public int getId() {

/**
* Sets one item in this inventory view by its raw slot ID.
* <p>
* <p />
* Note: If slot ID -999 is chosen, it may be expected that the item is
* dropped on the ground. This is not required behaviour, however.
* @param slot The ID as returned by InventoryClickEvent.getRawSlot()
@@ -77,8 +77,8 @@ public Material getType() {
}

/**
* Sets the type of this item<br />
* <br />
* Sets the type of this item
* <p />
* Note that in doing so you will reset the MaterialData for this stack
*
* @param type New type to set the items in this stack to
@@ -97,8 +97,8 @@ public int getTypeId() {
}

/**
* Sets the type id of this item<br />
* <br />
* Sets the type id of this item
* <p />
* Note that in doing so you will reset the MaterialData for this stack
*
* @param type New type id to set the items in this stack to
@@ -274,7 +274,7 @@ public Map<Enchantment, Integer> getEnchantments() {

/**
* Adds the specified enchantments to this item stack.
* <p>
* <p />
* This method is the same as calling {@link #addEnchantment(org.bukkit.enchantments.Enchantment, int)}
* for each element of the map.
*
@@ -288,7 +288,7 @@ public void addEnchantments(Map<Enchantment, Integer> enchantments) {

/**
* Adds the specified {@link Enchantment} to this item stack.
* <p>
* <p />
* If this item stack already contained the given enchantment (at any level), it will be replaced.
*
* @param ench Enchantment to add
@@ -306,7 +306,7 @@ public void addEnchantment(Enchantment ench, int level) {

/**
* Adds the specified enchantments to this item stack in an unsafe manner.
* <p>
* <p />
* This method is the same as calling {@link #addUnsafeEnchantment(org.bukkit.enchantments.Enchantment, int)}
* for each element of the map.
*
@@ -320,9 +320,9 @@ public void addUnsafeEnchantments(Map<Enchantment, Integer> enchantments) {

/**
* Adds the specified {@link Enchantment} to this item stack.
* <p>
* <p />
* If this item stack already contained the given enchantment (at any level), it will be replaced.
* <p>
* <p />
* This method is unsafe and will ignore level restrictions or item type. Use at your own
* discretion.
*
@@ -34,7 +34,7 @@ public interface Plugin extends CommandExecutor {

/**
* Gets a {@link FileConfiguration} for this plugin, read through "config.yml"
* <p>
* <p />
* If there is a default config.yml embedded in this plugin, it will be provided
* as a default for this Configuration.
*
@@ -161,7 +161,7 @@ public interface Messenger {

/**
* Checks if the specified plugin message listener registration is valid.
* <p>
* <p />
* A registration is considered valid if it has not be unregistered and that the plugin
* is still enabled.
*
@@ -8,7 +8,7 @@
*/
public interface PluginMessageListener {
/**
* A method that will be thrown when a {@link PluginMessageSource} sends a plugin
* A method that will be thrown when a PluginMessageSource sends a plugin
* message on a registered channel.
*
* @param channel Channel that the message was sent through.
@@ -9,7 +9,7 @@
public interface PluginMessageRecipient {
/**
* Sends this recipient a Plugin Message on the specified outgoing channel.
* <p>
* <p />
* The message may not be larger than {@link Messenger#MAX_MESSAGE_SIZE} bytes, and the plugin must be registered to send
* messages on the specified channel.
*
@@ -202,7 +202,7 @@ public static PotionEffectType getByName(String name) {

/**
* Registers an effect type with the given object.
* <p>
* <p />
* Generally not to be used from within a plugin.
*
* @param type PotionType to register