Pulling all pending Bukkit-JavaDoc changes

A special thanks goes to @aerouk for almost all of the changes found here.

By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
Bukkit/Spigot
2013-12-15 01:07:43 -05:00
parent 800679913f
commit bb50f1a774
310 changed files with 4218 additions and 2904 deletions

View File

@@ -11,9 +11,9 @@ import org.bukkit.metadata.Metadatable;
/**
* Represents a block. This is a live object, and only one Block may exist for
* any given location in a world. The state of the block may change concurrently
* to your own handling of it; use block.getState() to get a snapshot state of a
* block which will not be modified.
* any given location in a world. The state of the block may change
* concurrently to your own handling of it; use block.getState() to get a
* snapshot state of a block which will not be modified.
*/
public interface Block extends Metadatable {
@@ -50,8 +50,8 @@ public interface Block extends Metadatable {
/**
* Gets the block at the given distance of the given face
* <p>
* For example, the following method places water at 100,102,100; two blocks
* above 100,100,100.
* For example, the following method places water at 100,102,100; two
* blocks above 100,100,100.
*
* <pre>
* Block block = world.getBlockAt(100, 100, 100);
@@ -91,7 +91,8 @@ public interface Block extends Metadatable {
/**
* Get the amount of light at this block from the sky.
* <p>
* Any light given from other sources (such as blocks like torches) will be ignored.
* Any light given from other sources (such as blocks like torches) will
* be ignored.
*
* @return Sky light level
*/
@@ -142,8 +143,10 @@ public interface Block extends Metadatable {
Location getLocation();
/**
* Stores the location of the block in the provided Location object.<br />
* If the provided Location is null this method does nothing and returns null.
* Stores the location of the block in the provided Location object.
* <p>
* If the provided Location is null this method does nothing and returns
* null.
*
* @return The Location object provided or null
*/
@@ -237,8 +240,8 @@ public interface Block extends Metadatable {
* Captures the current state of this block. You may then cast that state
* into any accepted type, such as Furnace or Sign.
* <p>
* The returned object will never be updated, and you are not guaranteed that
* (for example) a sign is still a sign after you capture its state.
* The returned object will never be updated, and you are not guaranteed
* that (for example) a sign is still a sign after you capture its state.
*
* @return BlockState with the current state of this block.
*/
@@ -291,7 +294,8 @@ public interface Block extends Metadatable {
/**
* Returns the redstone power being provided to this block face
*
* @param face the face of the block to query or BlockFace.SELF for the block itself
* @param face the face of the block to query or BlockFace.SELF for the
* block itself
* @return The power level.
*/
int getBlockPower(BlockFace face);
@@ -306,7 +310,8 @@ public interface Block extends Metadatable {
/**
* Checks if this block is empty.
* <p>
* A block is considered empty when {@link #getType()} returns {@link Material#AIR}.
* A block is considered empty when {@link #getType()} returns {@link
* Material#AIR}.
*
* @return true if this block is empty
*/
@@ -315,7 +320,9 @@ public interface Block extends Metadatable {
/**
* Checks if this block is liquid.
* <p>
* A block is considered liquid when {@link #getType()} returns {@link Material#WATER}, {@link Material#STATIONARY_WATER}, {@link Material#LAVA} or {@link Material#STATIONARY_LAVA}.
* A block is considered liquid when {@link #getType()} returns {@link
* Material#WATER}, {@link Material#STATIONARY_WATER}, {@link
* Material#LAVA} or {@link Material#STATIONARY_LAVA}.
*
* @return true if this block is liquid
*/
@@ -350,7 +357,8 @@ public interface Block extends Metadatable {
boolean breakNaturally();
/**
* Breaks the block and spawns items as if a player had digged it with a specific tool
* Breaks the block and spawns items as if a player had digged it with a
* specific tool
*
* @param tool The tool or item in hand used for digging
* @return true if the block was destroyed
@@ -365,7 +373,8 @@ public interface Block extends Metadatable {
Collection<ItemStack> getDrops();
/**
* Returns a list of items which would drop by destroying this block with a specific tool
* Returns a list of items which would drop by destroying this block with
* a specific tool
*
* @param tool The tool or item in hand used for digging
* @return a list of dropped items for this type of block

View File

@@ -8,12 +8,13 @@ import org.bukkit.material.MaterialData;
import org.bukkit.metadata.Metadatable;
/**
* Represents a captured state of a block, which will not change automatically.
* Represents a captured state of a block, which will not change
* automatically.
* <p>
* Unlike Block, which only one object can exist per coordinate, BlockState can
* exist multiple times for any given Block. Note that another plugin may change
* the state of the block and you will not know, or they may change the block to
* another type entirely, causing your BlockState to become invalid.
* Unlike Block, which only one object can exist per coordinate, BlockState
* can exist multiple times for any given Block. Note that another plugin may
* change the state of the block and you will not know, or they may change the
* block to another type entirely, causing your BlockState to become invalid.
*/
public interface BlockState extends Metadatable {
@@ -90,8 +91,10 @@ public interface BlockState extends Metadatable {
Location getLocation();
/**
* Stores the location of this block in the provided Location object.<br />
* If the provided Location is null this method does nothing and returns null.
* Stores the location of this block in the provided Location object.
* <p>
* If the provided Location is null this method does nothing and returns
* null.
*
* @return The Location object provided or null
*/
@@ -129,8 +132,8 @@ public interface BlockState extends Metadatable {
boolean setTypeId(int type);
/**
* Attempts to update the block represented by this state, setting it to the
* new values as defined by this state.
* Attempts to update the block represented by this state, setting it to
* the new values as defined by this state.
* <p>
* This has the same effect as calling update(false). That is to say,
* this will not modify the state of a block if it is no longer the same
@@ -143,11 +146,11 @@ public interface BlockState extends Metadatable {
boolean update();
/**
* Attempts to update the block represented by this state, setting it to the
* new values as defined by this state.
* Attempts to update the block represented by this state, setting it to
* the new values as defined by this state.
* <p>
* This has the same effect as calling update(force, true). That is to say,
* this will trigger a physics update to surrounding blocks.
* This has the same effect as calling update(force, true). That is to
* say, this will trigger a physics update to surrounding blocks.
*
* @param force true to forcefully set the state
* @return true if the update was successful, otherwise false
@@ -155,21 +158,22 @@ public interface BlockState extends Metadatable {
boolean update(boolean force);
/**
* Attempts to update the block represented by this state, setting it to the
* new values as defined by this state.
* Attempts to update the block represented by this state, setting it to
* the new values as defined by this state.
* <p>
* Unless force is true, this will not modify the state of a block if it is
* no longer the same type as it was when this state was taken. It will return
* false in this eventuality.
* Unless force is true, this will not modify the state of a block if it
* is no longer the same type as it was when this state was taken. It will
* return false in this eventuality.
* <p>
* If force is true, it will set the type of the block to match the new state,
* set the state data and then return true.
* If force is true, it will set the type of the block to match the new
* state, set the state data and then return true.
* <p>
* If applyPhysics is true, it will trigger a physics update on surrounding
* blocks which could cause them to update or disappear.
* If applyPhysics is true, it will trigger a physics update on
* surrounding blocks which could cause them to update or disappear.
*
* @param force true to forcefully set the state
* @param applyPhysics false to cancel updating physics on surrounding blocks
* @param applyPhysics false to cancel updating physics on surrounding
* blocks
* @return true if the update was successful, otherwise false
*/
boolean update(boolean force, boolean applyPhysics);

View File

@@ -8,8 +8,8 @@ import org.bukkit.inventory.Inventory;
public interface Chest extends BlockState, ContainerBlock {
/**
* Returns the chest's inventory. If this is a double chest, it returns just
* the portion of the inventory linked to this half of the chest.
* Returns the chest's inventory. If this is a double chest, it returns
* just the portion of the inventory linked to this half of the chest.
*
* @return The inventory.
*/

View File

@@ -4,6 +4,7 @@ import org.bukkit.inventory.InventoryHolder;
/**
* Indicates a block type that has inventory.
*
* @deprecated in favour of {@link InventoryHolder}
*/
@Deprecated

View File

@@ -6,6 +6,9 @@ import org.bukkit.inventory.DoubleChestInventory;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
/**
* Represents a double chest.
*/
public class DoubleChest implements InventoryHolder {
private DoubleChestInventory inventory;

View File

@@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.Map;
public enum PistonMoveReaction {
/**
* Indicates that the block can be pushed or pulled.
*/