Pulling all pending Bukkit-JavaDoc changes

By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
Bukkit/Spigot 2013-09-10 21:02:53 -05:00
parent f60d6710d5
commit 67439804f4
61 changed files with 219 additions and 43 deletions

View File

@ -6,6 +6,7 @@ import org.bukkit.entity.Player;
import org.bukkit.permissions.ServerOperator; import org.bukkit.permissions.ServerOperator;
public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable { public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable {
/** /**
* Checks if this player is currently online * Checks if this player is currently online
* *

View File

@ -5,6 +5,7 @@ package org.bukkit;
* It represents how something is viewed, as opposed to cardinal directions. * It represents how something is viewed, as opposed to cardinal directions.
*/ */
public enum Rotation { public enum Rotation {
/** /**
* No rotation * No rotation
*/ */

View File

@ -1,72 +1,94 @@
package org.bukkit; package org.bukkit;
/**
* The Travel Agent handles the creation and the research of Nether and End
* portals when Entities try to use one.
* <p>
* It is used in {@link org.bukkit.event.entity.EntityPortalEvent} and in
* {@link org.bukkit.event.player.PlayerPortalEvent} to help developers
* reproduce and/or modify Vanilla behaviour.
*/
public interface TravelAgent { public interface TravelAgent {
/** /**
* Set the Block radius to search in for available portals. * Set the Block radius to search in for available portals.
* *
* @param radius The radius in which to search for a portal from the location. * @param radius the radius in which to search for a portal from the
* @return This travel agent. * location
* @return this travel agent
*/ */
public TravelAgent setSearchRadius(int radius); public TravelAgent setSearchRadius(int radius);
/** /**
* Gets the search radius value for finding an available portal. * Gets the search radius value for finding an available portal.
* *
* @return Returns the currently set search radius. * @return the currently set search radius
*/ */
public int getSearchRadius(); public int getSearchRadius();
/** /**
* Sets the maximum radius from the given location to create a portal. * Sets the maximum radius from the given location to create a portal.
* *
* @param radius The radius in which to create a portal from the location. * @param radius the radius in which to create a portal from the location
* @return This travel agent. * @return this travel agent
*/ */
public TravelAgent setCreationRadius(int radius); public TravelAgent setCreationRadius(int radius);
/** /**
* Gets the maximum radius from the given location to create a portal. * Gets the maximum radius from the given location to create a portal.
* *
* @return Returns the currently set creation radius. * @return the currently set creation radius
*/ */
public int getCreationRadius(); public int getCreationRadius();
/** /**
* Returns whether the TravelAgent will attempt to create a destination portal or not. * Returns whether the TravelAgent will attempt to create a destination
* portal or not.
* *
* @return Return whether the TravelAgent should create a destination portal or not. * @return whether the TravelAgent should create a destination portal or
* not
*/ */
public boolean getCanCreatePortal(); public boolean getCanCreatePortal();
/** /**
* Sets whether the TravelAgent should attempt to create a destination portal or not. * Sets whether the TravelAgent should attempt to create a destination
* portal or not.
* *
* @param create Sets whether the TravelAgent should create a destination portal or not. * @param create Sets whether the TravelAgent should create a destination
* portal or not
*/ */
public void setCanCreatePortal(boolean create); public void setCanCreatePortal(boolean create);
/** /**
* Attempt to find a portal near the given location, if a portal is not found it will attempt to create one. * Attempt to find a portal near the given location, if a portal is not
* found it will attempt to create one.
* *
* @param location The location where the search for a portal should begin. * @param location the location where the search for a portal should begin
* @return Returns the location of a portal which has been found or returns the location passed to the method if unsuccessful. * @return the location of a portal which has been found or returns the
* location passed to the method if unsuccessful
* @see #createPortal(Location)
*/ */
public Location findOrCreate(Location location); public Location findOrCreate(Location location);
/** /**
* Attempt to find a portal near the given location. * Attempt to find a portal near the given location.
* *
* @param location The desired location of the portal. * @param location the desired location of the portal
* @return Returns the location of the nearest portal to the location. * @return the location of the nearest portal to the location
*/ */
public Location findPortal(Location location); public Location findPortal(Location location);
/** /**
* Attempt to create a portal near the given location. * Attempt to create a portal near the given location.
* <p>
* In the case of a Nether portal teleportation, this will attempt to
* create a Nether portal.
* <p>
* In the case of an Ender portal teleportation, this will (re-)create the
* obsidian platform and clean blocks above it.
* *
* @param location The desired location of the portal. * @param location the desired location of the portal
* @return True if a nether portal was successfully created. * @return true if a portal was successfully created
*/ */
public boolean createPortal(Location location); public boolean createPortal(Location location);
} }

View File

@ -4,6 +4,7 @@ package org.bukkit;
* Tree and organic structure types. * Tree and organic structure types.
*/ */
public enum TreeType { public enum TreeType {
/** /**
* Regular tree, no branches * Regular tree, no branches
*/ */

View File

@ -20,6 +20,7 @@ public @interface Warning {
* This represents the states that server verbose for warnings may be. * This represents the states that server verbose for warnings may be.
*/ */
public enum WarningState { public enum WarningState {
/** /**
* Indicates all warnings should be printed for deprecated items. * Indicates all warnings should be printed for deprecated items.
*/ */

View File

@ -3,6 +3,7 @@ package org.bukkit.command;
import org.bukkit.block.Block; import org.bukkit.block.Block;
public interface BlockCommandSender extends CommandSender { public interface BlockCommandSender extends CommandSender {
/** /**
* Returns the block this command sender belongs to * Returns the block this command sender belongs to
* *

View File

@ -11,6 +11,11 @@ public class MultipleCommandAlias extends Command {
this.commands = commands; this.commands = commands;
} }
/**
* Gets the commands associated with the multi-command alias.
*
* @return commands associated with alias
*/
public Command[] getCommands() { public Command[] getCommands() {
return commands; return commands;
} }

View File

@ -75,6 +75,7 @@ public final class PluginCommand extends Command implements PluginIdentifiableCo
/** /**
* Sets the {@link TabCompleter} to run when tab-completing this command. * Sets the {@link TabCompleter} to run when tab-completing this command.
* <p>
* If no TabCompleter is specified, and the command's executor implements * If no TabCompleter is specified, and the command's executor implements
* TabCompleter, then the executor will be used for tab completion. * TabCompleter, then the executor will be used for tab completion.
* *
@ -112,6 +113,7 @@ public final class PluginCommand extends Command implements PluginIdentifiableCo
* {@link Command#tabComplete(CommandSender, String, String[])}.<br> * {@link Command#tabComplete(CommandSender, String, String[])}.<br>
* <br> * <br>
* This method does not consider permissions. * This method does not consider permissions.
*
* @throws CommandException if the completer or executor throw an exception during the process of tab-completing. * @throws CommandException if the completer or executor throw an exception during the process of tab-completing.
* @throws IllegalArgumentException if sender, alias, or args is null * @throws IllegalArgumentException if sender, alias, or args is null
*/ */

View File

@ -4,6 +4,7 @@ import java.util.List;
/** /**
* Represents a class which can handle command tab completion and commands * Represents a class which can handle command tab completion and commands
*
* @deprecated Remains for plugins that would have implemented it even without functionality * @deprecated Remains for plugins that would have implemented it even without functionality
* @see TabExecutor * @see TabExecutor
*/ */

View File

@ -5,6 +5,7 @@ package org.bukkit.configuration;
*/ */
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class InvalidConfigurationException extends Exception { public class InvalidConfigurationException extends Exception {
/** /**
* Creates a new instance of InvalidConfigurationException without a message or cause. * Creates a new instance of InvalidConfigurationException without a message or cause.
*/ */

View File

@ -16,10 +16,12 @@ import java.util.Map;
* </ul> * </ul>
* In addition to implementing this interface, you must register the class with * In addition to implementing this interface, you must register the class with
* {@link ConfigurationSerialization#registerClass(Class)}. * {@link ConfigurationSerialization#registerClass(Class)}.
*
* @see DelegateDeserialization * @see DelegateDeserialization
* @see SerializableAs * @see SerializableAs
*/ */
public interface ConfigurationSerializable { public interface ConfigurationSerializable {
/** /**
* Creates a Map representation of this class. * Creates a Map representation of this class.
* <p> * <p>

View File

@ -15,6 +15,7 @@ import java.lang.annotation.Target;
* <p> * <p>
* Using this annotation on any other class than a {@link ConfigurationSerializable} will * Using this annotation on any other class than a {@link ConfigurationSerializable} will
* have no effect. * have no effect.
*
* @see ConfigurationSerialization#registerClass(Class, String) * @see ConfigurationSerialization#registerClass(Class, String)
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)

View File

@ -1,6 +1,7 @@
package org.bukkit.entity; package org.bukkit.entity;
public interface AnimalTamer { public interface AnimalTamer {
/** /**
* This is the name of the specified AnimalTamer. * This is the name of the specified AnimalTamer.
* *

View File

@ -4,6 +4,7 @@ package org.bukkit.entity;
* Represents a single part of a {@link ComplexLivingEntity} * Represents a single part of a {@link ComplexLivingEntity}
*/ */
public interface ComplexEntityPart extends Entity { public interface ComplexEntityPart extends Entity {
/** /**
* Gets the parent {@link ComplexLivingEntity} of this part. * Gets the parent {@link ComplexLivingEntity} of this part.
* *

View File

@ -14,10 +14,11 @@ import org.bukkit.Location;
import org.bukkit.World; import org.bukkit.World;
public enum EntityType { public enum EntityType {
// These strings MUST match the strings in nms.EntityTypes and are case sensitive. // These strings MUST match the strings in nms.EntityTypes and are case sensitive.
/** /**
* An item resting on the ground. * An item resting on the ground.
* * <p>
* Spawn with {@link World#dropItem(Location, ItemStack)} * Spawn with {@link World#dropItem(Location, ItemStack)}
* or {@link World#dropItemNaturally(Location, ItemStack)} * or {@link World#dropItemNaturally(Location, ItemStack)}
*/ */

View File

@ -4,6 +4,7 @@ package org.bukkit.entity;
* Represents an Experience Orb. * Represents an Experience Orb.
*/ */
public interface ExperienceOrb extends Entity { public interface ExperienceOrb extends Entity {
/** /**
* Gets how much experience is contained within this orb * Gets how much experience is contained within this orb
* *

View File

@ -4,6 +4,7 @@ package org.bukkit.entity;
* A representation of an explosive entity * A representation of an explosive entity
*/ */
public interface Explosive extends Entity { public interface Explosive extends Entity {
/** /**
* Set the radius affected by this explosive's explosion * Set the radius affected by this explosive's explosion
* *

View File

@ -6,6 +6,7 @@ import org.bukkit.util.Vector;
* Represents a Fireball. * Represents a Fireball.
*/ */
public interface Fireball extends Projectile, Explosive { public interface Fireball extends Projectile, Explosive {
/** /**
* Fireballs fly straight and do not take setVelocity(...) well. * Fireballs fly straight and do not take setVelocity(...) well.
* *

View File

@ -3,6 +3,7 @@ package org.bukkit.entity;
import org.bukkit.inventory.meta.FireworkMeta; import org.bukkit.inventory.meta.FireworkMeta;
public interface Firework extends Entity { public interface Firework extends Entity {
/** /**
* Get a copy of the fireworks meta * Get a copy of the fireworks meta
* *

View File

@ -5,6 +5,7 @@ package org.bukkit.entity;
* A wild tameable cat * A wild tameable cat
*/ */
public interface Ocelot extends Animals, Tameable { public interface Ocelot extends Animals, Tameable {
/** /**
* Gets the current type of this cat. * Gets the current type of this cat.
* *

View File

@ -7,6 +7,7 @@ import org.bukkit.event.painting.PaintingBreakEvent;
* Represents a Painting. * Represents a Painting.
*/ */
public interface Painting extends Hanging { public interface Painting extends Hanging {
/** /**
* Get the art on this painting * Get the art on this painting
* *

View File

@ -4,6 +4,7 @@ package org.bukkit.entity;
* Represents a Pig Zombie. * Represents a Pig Zombie.
*/ */
public interface PigZombie extends Zombie { public interface PigZombie extends Zombie {
/** /**
* Get the pig zombie's current anger level. * Get the pig zombie's current anger level.
* *

View File

@ -4,6 +4,7 @@ package org.bukkit.entity;
* Represents a Skeleton. * Represents a Skeleton.
*/ */
public interface Skeleton extends Monster { public interface Skeleton extends Monster {
/** /**
* Gets the current type of this skeleton. * Gets the current type of this skeleton.
* *

View File

@ -4,6 +4,7 @@ package org.bukkit.entity;
* Represents a Primed TNT. * Represents a Primed TNT.
*/ */
public interface TNTPrimed extends Explosive { public interface TNTPrimed extends Explosive {
/** /**
* Set the number of ticks until the TNT blows up after being primed. * Set the number of ticks until the TNT blows up after being primed.
* *

View File

@ -4,6 +4,7 @@ package org.bukkit.entity;
* Represents a Zombie. * Represents a Zombie.
*/ */
public interface Zombie extends Monster { public interface Zombie extends Monster {
/** /**
* Gets whether the zombie is a baby * Gets whether the zombie is a baby
* *

View File

@ -1,6 +1,7 @@
package org.bukkit.event; package org.bukkit.event;
public interface Cancellable { public interface Cancellable {
/** /**
* Gets the cancellation state of this event. A cancelled event will not * Gets the cancellation state of this event. A cancelled event will not
* be executed in the server, but will still pass to other plugins * be executed in the server, but will still pass to other plugins

View File

@ -4,6 +4,7 @@ package org.bukkit.event;
* Represents an event's priority in execution * Represents an event's priority in execution
*/ */
public enum EventPriority { public enum EventPriority {
/** /**
* Event call is of very low importance and should be ran first, to allow * Event call is of very low importance and should be ran first, to allow
* other plugins to further customise the outcome * other plugins to further customise the outcome

View File

@ -10,6 +10,7 @@ import java.util.Map.Entry;
* A list of event handlers, stored per-event. Based on lahwran's fevents. * A list of event handlers, stored per-event. Based on lahwran's fevents.
*/ */
public class HandlerList { public class HandlerList {
/** /**
* Handler array. This field being an array is the key to this system's speed. * Handler array. This field being an array is the key to this system's speed.
*/ */

View File

@ -3,6 +3,9 @@ package org.bukkit.event.entity;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
/**
* Called when a block causes an entity to combust.
*/
public class EntityCombustByBlockEvent extends EntityCombustEvent { public class EntityCombustByBlockEvent extends EntityCombustEvent {
private final Block combuster; private final Block combuster;

View File

@ -2,6 +2,9 @@ package org.bukkit.event.entity;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
/**
* Called when an entity causes another entity to combust.
*/
public class EntityCombustByEntityEvent extends EntityCombustEvent { public class EntityCombustByEntityEvent extends EntityCombustEvent {
private final Entity combuster; private final Entity combuster;

View File

@ -6,9 +6,10 @@ import org.bukkit.entity.Entity;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
/** /**
* Called when a non-player entity is about to teleport because it is in contact with a portal * Called when a non-player entity is about to teleport because it is in
* contact with a portal.
* <p> * <p>
* For players see {@link org.bukkit.event.player.PlayerPortalEvent PlayerPortalEvent} * For players see {@link org.bukkit.event.player.PlayerPortalEvent}
*/ */
public class EntityPortalEvent extends EntityTeleportEvent { public class EntityPortalEvent extends EntityTeleportEvent {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList handlers = new HandlerList();
@ -20,18 +21,52 @@ public class EntityPortalEvent extends EntityTeleportEvent {
this.travelAgent = pta; this.travelAgent = pta;
} }
/**
* Sets whether or not the Travel Agent will be used.
* <p>
* If this is set to true, the TravelAgent will try to find a Portal at
* the {@link #getTo()} Location, and will try to create one if there is
* none.
* <p>
* If this is set to false, the {@link #getEntity()} will only be
* teleported to the {@link #getTo()} Location.
*
* @param useTravelAgent whether to use the Travel Agent
*/
public void useTravelAgent(boolean useTravelAgent) { public void useTravelAgent(boolean useTravelAgent) {
this.useTravelAgent = useTravelAgent; this.useTravelAgent = useTravelAgent;
} }
/**
* Gets whether or not the Travel Agent will be used.
* <p>
* If this is set to true, the TravelAgent will try to find a Portal at
* the {@link #getTo()} Location, and will try to create one if there is
* none.
* <p>
* If this is set to false, the {@link #getEntity()} will only be
* teleported to the {@link #getTo()} Location.
*
* @return whether to use the Travel Agent
*/
public boolean useTravelAgent() { public boolean useTravelAgent() {
return useTravelAgent; return useTravelAgent;
} }
/**
* Gets the Travel Agent used (or not) in this event.
*
* @return the Travel Agent used (or not) in this event
*/
public TravelAgent getPortalTravelAgent() { public TravelAgent getPortalTravelAgent() {
return this.travelAgent; return this.travelAgent;
} }
/**
* Sets the Travel Agent used (or not) in this event.
*
* @param travelAgent the Travel Agent used (or not) in this event
*/
public void setPortalTravelAgent(TravelAgent travelAgent) { public void setPortalTravelAgent(TravelAgent travelAgent) {
this.travelAgent = travelAgent; this.travelAgent = travelAgent;
} }

View File

@ -5,6 +5,13 @@ import org.bukkit.entity.Item;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
/**
* This event is called when a {@link org.bukkit.entity.Item} is removed from
* the world because it has existed for 5 minutes.
* <p>
* Cancelling the event results in the item being allowed to exist for 5 more
* minutes. This behavior is not guaranteed and may change in future versions.
*/
public class ItemDespawnEvent extends EntityEvent implements Cancellable { public class ItemDespawnEvent extends EntityEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList handlers = new HandlerList();
private boolean canceled; private boolean canceled;

View File

@ -4,6 +4,7 @@ package org.bukkit.event.inventory;
* What the client did to trigger this action (not the result). * What the client did to trigger this action (not the result).
*/ */
public enum ClickType { public enum ClickType {
/** /**
* The left (or primary) mouse button. * The left (or primary) mouse button.
*/ */

View File

@ -5,6 +5,9 @@ import org.bukkit.inventory.CraftingInventory;
import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.Recipe; import org.bukkit.inventory.Recipe;
/**
* Called when the recipe of an Item is completed inside a crafting matrix.
*/
public class CraftItemEvent extends InventoryClickEvent { public class CraftItemEvent extends InventoryClickEvent {
private Recipe recipe; private Recipe recipe;

View File

@ -4,8 +4,10 @@ package org.bukkit.event.inventory;
* An estimation of what the result will be. * An estimation of what the result will be.
*/ */
public enum InventoryAction { public enum InventoryAction {
/** /**
* Nothing will happen from the click. * Nothing will happen from the click.
* <p>
* There may be cases where nothing will happen and this is value is * There may be cases where nothing will happen and this is value is
* not provided, but it is guaranteed that this value is accurate * not provided, but it is guaranteed that this value is accurate
* when given. * when given.

View File

@ -1,6 +1,7 @@
package org.bukkit.event.inventory; package org.bukkit.event.inventory;
public enum InventoryType { public enum InventoryType {
/** /**
* A chest inventory, with 0, 9, 18, 27, 36, 45, or 54 slots of type CONTAINER. * A chest inventory, with 0, 9, 18, 27, 36, 45, or 54 slots of type CONTAINER.
*/ */

View File

@ -7,6 +7,9 @@ import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
/**
* Called when a player interacts with a Bucket
*/
public abstract class PlayerBucketEvent extends PlayerEvent implements Cancellable { public abstract class PlayerBucketEvent extends PlayerEvent implements Cancellable {
private ItemStack itemStack; private ItemStack itemStack;
private boolean cancelled = false; private boolean cancelled = false;

View File

@ -77,7 +77,7 @@ public class PlayerEditBookEvent extends PlayerEvent implements Cancellable {
/** /**
* Sets the book meta that will actually be added to the book. * Sets the book meta that will actually be added to the book.
* *
* @param bookMeta new book meta * @param newBookMeta new book meta
* @throws IllegalArgumentException if the new book meta is null * @throws IllegalArgumentException if the new book meta is null
*/ */
public void setNewBookMeta(BookMeta newBookMeta) throws IllegalArgumentException { public void setNewBookMeta(BookMeta newBookMeta) throws IllegalArgumentException {

View File

@ -6,7 +6,10 @@ import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
/** /**
* Called when a player is about to teleport because it is in contact with a portal * Called when a player is about to teleport because it is in contact with a
* portal.
* <p>
* For other entities see {@link org.bukkit.event.entity.EntityPortalEvent}
*/ */
public class PlayerPortalEvent extends PlayerTeleportEvent { public class PlayerPortalEvent extends PlayerTeleportEvent {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList handlers = new HandlerList();
@ -23,18 +26,52 @@ public class PlayerPortalEvent extends PlayerTeleportEvent {
this.travelAgent = pta; this.travelAgent = pta;
} }
/**
* Sets whether or not the Travel Agent will be used.
* <p>
* If this is set to true, the TravelAgent will try to find a Portal at
* the {@link #getTo()} Location, and will try to create one if there is
* none.
* <p>
* If this is set to false, the {@link #getPlayer()} will only be
* teleported to the {@link #getTo()} Location.
*
* @param useTravelAgent whether to use the Travel Agent
*/
public void useTravelAgent(boolean useTravelAgent) { public void useTravelAgent(boolean useTravelAgent) {
this.useTravelAgent = useTravelAgent; this.useTravelAgent = useTravelAgent;
} }
/**
* Gets whether or not the Travel Agent will be used.
* <p>
* If this is set to true, the TravelAgent will try to find a Portal at
* the {@link #getTo()} Location, and will try to create one if there is
* none.
* <p>
* If this is set to false, the {@link #getPlayer()}} will only be
* teleported to the {@link #getTo()} Location.
*
* @return whether to use the Travel Agent
*/
public boolean useTravelAgent() { public boolean useTravelAgent() {
return useTravelAgent && travelAgent != null; return useTravelAgent && travelAgent != null;
} }
/**
* Gets the Travel Agent used (or not) in this event.
*
* @return the Travel Agent used (or not) in this event
*/
public TravelAgent getPortalTravelAgent() { public TravelAgent getPortalTravelAgent() {
return this.travelAgent; return this.travelAgent;
} }
/**
* Sets the Travel Agent used (or not) in this event.
*
* @param travelAgent the Travel Agent used (or not) in this event
*/
public void setPortalTravelAgent(TravelAgent travelAgent) { public void setPortalTravelAgent(TravelAgent travelAgent) {
this.travelAgent = travelAgent; this.travelAgent = travelAgent;
} }

View File

@ -3,6 +3,9 @@ package org.bukkit.event.vehicle;
import org.bukkit.entity.Vehicle; import org.bukkit.entity.Vehicle;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
/**
* Called when a vehicle updates
*/
public class VehicleUpdateEvent extends VehicleEvent { public class VehicleUpdateEvent extends VehicleEvent {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList handlers = new HandlerList();

View File

@ -9,6 +9,7 @@ import org.bukkit.World;
* For example, generating glowstone inside the nether or generating dungeons full of treasure * For example, generating glowstone inside the nether or generating dungeons full of treasure
*/ */
public abstract class BlockPopulator { public abstract class BlockPopulator {
/** /**
* Populates an area of blocks at or around the given chunk. * Populates an area of blocks at or around the given chunk.
* <p> * <p>

View File

@ -14,6 +14,7 @@ import org.bukkit.block.Block;
* For example, the nether chunk generator should shape netherrack and soulsand * For example, the nether chunk generator should shape netherrack and soulsand
*/ */
public abstract class ChunkGenerator { public abstract class ChunkGenerator {
/** /**
* Interface to biome data for chunk to be generated: initialized with default values for world type and seed. * Interface to biome data for chunk to be generated: initialized with default values for world type and seed.
* <p> * <p>

View File

@ -1,6 +1,7 @@
package org.bukkit.inventory; package org.bukkit.inventory;
public interface BeaconInventory extends Inventory { public interface BeaconInventory extends Inventory {
/** /**
* Set the item powering the beacon. * Set the item powering the beacon.
* *

View File

@ -3,6 +3,7 @@ package org.bukkit.inventory;
import org.bukkit.block.BrewingStand; import org.bukkit.block.BrewingStand;
public interface BrewerInventory extends Inventory { public interface BrewerInventory extends Inventory {
/** /**
* Get the current ingredient for brewing. * Get the current ingredient for brewing.
* *

View File

@ -4,6 +4,7 @@ package org.bukkit.inventory;
* Interface to the crafting inventories * Interface to the crafting inventories
*/ */
public interface CraftingInventory extends Inventory { public interface CraftingInventory extends Inventory {
/** /**
* Check what item is in the result slot of this crafting inventory. * Check what item is in the result slot of this crafting inventory.
* *

View File

@ -3,6 +3,7 @@ package org.bukkit.inventory;
import org.bukkit.block.DoubleChest; import org.bukkit.block.DoubleChest;
public interface DoubleChestInventory extends Inventory { public interface DoubleChestInventory extends Inventory {
/** /**
* Get the left half of this double chest. * Get the left half of this double chest.
* *

View File

@ -1,6 +1,7 @@
package org.bukkit.inventory; package org.bukkit.inventory;
public interface EnchantingInventory extends Inventory { public interface EnchantingInventory extends Inventory {
/** /**
* Set the item being enchanted. * Set the item being enchanted.
* *

View File

@ -6,6 +6,7 @@ import org.bukkit.entity.Entity;
* An interface to a creatures inventory * An interface to a creatures inventory
*/ */
public interface EntityEquipment { public interface EntityEquipment {
/** /**
* Gets a copy of the item the entity is currently holding * Gets a copy of the item the entity is currently holding
* *

View File

@ -3,6 +3,7 @@ package org.bukkit.inventory;
import org.bukkit.block.Furnace; import org.bukkit.block.Furnace;
public interface FurnaceInventory extends Inventory { public interface FurnaceInventory extends Inventory {
/** /**
* Get the current item in the result slot. * Get the current item in the result slot.
* *

View File

@ -171,21 +171,28 @@ public interface Inventory extends Iterable<ItemStack> {
public boolean contains(Material material, int amount) throws IllegalArgumentException; public boolean contains(Material material, int amount) throws IllegalArgumentException;
/** /**
* Checks if the inventory contains any ItemStacks matching the given ItemStack and at least the minimum amount specified * Checks if the inventory contains at least the minimum amount specified
* This will only match if both the type and the amount of the stack match * of exactly matching ItemStacks.
* <p>
* An ItemStack only counts if both the type and the amount of the stack
* match.
* *
* @param item The ItemStack to match against * @param item the ItemStack to match against
* @param amount The amount of stacks to find * @param amount how many identical stacks to check for
* @return false if item is null, true if amount less than 1, true if amount of exactly matching ItemStacks were found. * @return false if item is null, true if amount less than 1, true if
* amount of exactly matching ItemStacks were found
* @see #containsAtLeast(ItemStack, int)
*/ */
public boolean contains(ItemStack item, int amount); public boolean contains(ItemStack item, int amount);
/** /**
* Checks if the inventory contains any ItemStacks matching the given ItemStack and at least the minimum amount specified * Checks if the inventory contains ItemStacks matching the given
* ItemStack whose amounts sum to at least the minimum amount specified.
* *
* @param item The ItemStack to match against * @param item the ItemStack to match against
* @param amount The minimum amount * @param amount the minimum amount
* @return false if item is null, true if amount less than 1, true if enough ItemStacks were found to add to the given amount * @return false if item is null, true if amount less than 1, true if
* enough ItemStacks were found to add to the given amount
*/ */
public boolean containsAtLeast(ItemStack item, int amount); public boolean containsAtLeast(ItemStack item, int amount);

View File

@ -1,6 +1,7 @@
package org.bukkit.inventory; package org.bukkit.inventory;
public interface InventoryHolder { public interface InventoryHolder {
/** /**
* Get the object's inventory. * Get the object's inventory.
* *

View File

@ -7,6 +7,7 @@ import org.bukkit.plugin.Plugin;
* Represents an object that may be assigned permissions * Represents an object that may be assigned permissions
*/ */
public interface Permissible extends ServerOperator { public interface Permissible extends ServerOperator {
/** /**
* Checks if this object contains an override for the specified permission, by fully qualified name * Checks if this object contains an override for the specified permission, by fully qualified name
* *

View File

@ -4,6 +4,7 @@ package org.bukkit.permissions;
* Represents a class which is to be notified when a {@link PermissionAttachment} is removed from a {@link Permissible} * Represents a class which is to be notified when a {@link PermissionAttachment} is removed from a {@link Permissible}
*/ */
public interface PermissionRemovedExecutor { public interface PermissionRemovedExecutor {
/** /**
* Called when a {@link PermissionAttachment} is removed from a {@link Permissible} * Called when a {@link PermissionAttachment} is removed from a {@link Permissible}
* *

View File

@ -6,6 +6,7 @@ import org.bukkit.entity.Player;
* Represents an object that may become a server operator, such as a {@link Player} * Represents an object that may become a server operator, such as a {@link Player}
*/ */
public interface ServerOperator { public interface ServerOperator {
/** /**
* Checks if this object is a server operator * Checks if this object is a server operator
* *

View File

@ -37,7 +37,9 @@ public class Potion {
} }
} }
/** @deprecated In favour of {@link #Potion(PotionType, int)} */ /**
* @deprecated In favour of {@link #Potion(PotionType, int)}
*/
@SuppressWarnings("javadoc") @SuppressWarnings("javadoc")
@Deprecated @Deprecated
public Potion(PotionType type, Tier tier) { public Potion(PotionType type, Tier tier) {
@ -45,14 +47,18 @@ public class Potion {
Validate.notNull(type, "Type cannot be null"); Validate.notNull(type, "Type cannot be null");
} }
/** @deprecated In favour of {@link #Potion(PotionType, int, boolean)} */ /**
* @deprecated In favour of {@link #Potion(PotionType, int, boolean)}
*/
@SuppressWarnings("javadoc") @SuppressWarnings("javadoc")
@Deprecated @Deprecated
public Potion(PotionType type, Tier tier, boolean splash) { public Potion(PotionType type, Tier tier, boolean splash) {
this(type, tier == Tier.TWO ? 2 : 1, splash); this(type, tier == Tier.TWO ? 2 : 1, splash);
} }
/** @deprecated In favour of {@link #Potion(PotionType, int, boolean, boolean)} */ /**
* @deprecated In favour of {@link #Potion(PotionType, int, boolean, boolean)}
*/
@SuppressWarnings("javadoc") @SuppressWarnings("javadoc")
@Deprecated @Deprecated
public Potion(PotionType type, Tier tier, boolean splash, boolean extended) { public Potion(PotionType type, Tier tier, boolean splash, boolean extended) {

View File

@ -6,6 +6,7 @@ import java.util.Collection;
* Represents a brewer that can create {@link PotionEffect}s. * Represents a brewer that can create {@link PotionEffect}s.
*/ */
public interface PotionBrewer { public interface PotionBrewer {
/** /**
* Creates a {@link PotionEffect} from the given {@link PotionEffectType}, * Creates a {@link PotionEffect} from the given {@link PotionEffectType},
* applying duration modifiers and checks. * applying duration modifiers and checks.

View File

@ -5,7 +5,6 @@ import org.bukkit.plugin.Plugin;
/** /**
* Represents a task being executed by the scheduler * Represents a task being executed by the scheduler
*/ */
public interface BukkitTask { public interface BukkitTask {
/** /**

View File

@ -8,7 +8,6 @@ import org.bukkit.plugin.Plugin;
* </p> * </p>
* Workers are used to execute async tasks. * Workers are used to execute async tasks.
*/ */
public interface BukkitWorker { public interface BukkitWorker {
/** /**

View File

@ -9,7 +9,6 @@ import java.io.IOException;
/** /**
* Class containing file utilities * Class containing file utilities
*/ */
public class FileUtil { public class FileUtil {
/** /**
@ -19,7 +18,6 @@ public class FileUtil {
* @param outFile the target filename * @param outFile the target filename
* @return true on success * @return true on success
*/ */
public static boolean copy(File inFile, File outFile) { public static boolean copy(File inFile, File outFile) {
if (!inFile.exists()) { if (!inFile.exists()) {
return false; return false;

View File

@ -23,7 +23,7 @@ public class BukkitObjectInputStream extends ObjectInputStream {
* *
* @throws IOException * @throws IOException
* @throws SecurityException * @throws SecurityException
* @see {@link ObjectInputStream#ObjectInputStream()} * @see ObjectInputStream#ObjectInputStream()
*/ */
protected BukkitObjectInputStream() throws IOException, SecurityException { protected BukkitObjectInputStream() throws IOException, SecurityException {
super(); super();
@ -35,7 +35,7 @@ public class BukkitObjectInputStream extends ObjectInputStream {
* *
* @param in * @param in
* @throws IOException * @throws IOException
* @see {@link ObjectInputStream#ObjectInputStream(InputStream)} * @see ObjectInputStream#ObjectInputStream(InputStream)
*/ */
public BukkitObjectInputStream(InputStream in) throws IOException { public BukkitObjectInputStream(InputStream in) throws IOException {
super(in); super(in);

View File

@ -23,7 +23,7 @@ public class BukkitObjectOutputStream extends ObjectOutputStream {
* *
* @throws IOException * @throws IOException
* @throws SecurityException * @throws SecurityException
* @see {@link ObjectOutputStream#ObjectOutputStream()} * @see ObjectOutputStream#ObjectOutputStream()
*/ */
protected BukkitObjectOutputStream() throws IOException, SecurityException { protected BukkitObjectOutputStream() throws IOException, SecurityException {
super(); super();
@ -35,7 +35,7 @@ public class BukkitObjectOutputStream extends ObjectOutputStream {
* *
* @param out * @param out
* @throws IOException * @throws IOException
* @see {@link ObjectOutputStream#ObjectOutputStream(OutputStream)} * @see ObjectOutputStream#ObjectOutputStream(OutputStream)
*/ */
public BukkitObjectOutputStream(OutputStream out) throws IOException { public BukkitObjectOutputStream(OutputStream out) throws IOException {
super(out); super(out);