mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-07 16:57:42 +01:00
Pulling all pending Bukkit-JavaDoc changes
By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
parent
f60d6710d5
commit
67439804f4
@ -6,6 +6,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.ServerOperator;
|
||||
|
||||
public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
* Checks if this player is currently online
|
||||
*
|
||||
|
@ -5,6 +5,7 @@ package org.bukkit;
|
||||
* It represents how something is viewed, as opposed to cardinal directions.
|
||||
*/
|
||||
public enum Rotation {
|
||||
|
||||
/**
|
||||
* No rotation
|
||||
*/
|
||||
|
@ -1,72 +1,94 @@
|
||||
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 {
|
||||
|
||||
/**
|
||||
* Set the Block radius to search in for available portals.
|
||||
*
|
||||
* @param radius The radius in which to search for a portal from the location.
|
||||
* @return This travel agent.
|
||||
* @param radius the radius in which to search for a portal from the
|
||||
* location
|
||||
* @return this travel agent
|
||||
*/
|
||||
public TravelAgent setSearchRadius(int radius);
|
||||
|
||||
/**
|
||||
* 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();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @return This travel agent.
|
||||
* @param radius the radius in which to create a portal from the location
|
||||
* @return this travel agent
|
||||
*/
|
||||
public TravelAgent setCreationRadius(int radius);
|
||||
|
||||
/**
|
||||
* 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();
|
||||
|
||||
/**
|
||||
* 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();
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @return Returns the location of a portal which has been found or returns the location passed to the method if unsuccessful.
|
||||
* @param location the location where the search for a portal should begin
|
||||
* @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);
|
||||
|
||||
/**
|
||||
* Attempt to find a portal near the given location.
|
||||
*
|
||||
* @param location The desired location of the portal.
|
||||
* @return Returns the location of the nearest portal to the location.
|
||||
* @param location the desired location of the portal
|
||||
* @return the location of the nearest portal to the location
|
||||
*/
|
||||
public Location findPortal(Location 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.
|
||||
* @return True if a nether portal was successfully created.
|
||||
* @param location the desired location of the portal
|
||||
* @return true if a portal was successfully created
|
||||
*/
|
||||
public boolean createPortal(Location location);
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ package org.bukkit;
|
||||
* Tree and organic structure types.
|
||||
*/
|
||||
public enum TreeType {
|
||||
|
||||
/**
|
||||
* Regular tree, no branches
|
||||
*/
|
||||
|
@ -20,6 +20,7 @@ public @interface Warning {
|
||||
* This represents the states that server verbose for warnings may be.
|
||||
*/
|
||||
public enum WarningState {
|
||||
|
||||
/**
|
||||
* Indicates all warnings should be printed for deprecated items.
|
||||
*/
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.command;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
public interface BlockCommandSender extends CommandSender {
|
||||
|
||||
/**
|
||||
* Returns the block this command sender belongs to
|
||||
*
|
||||
|
@ -11,6 +11,11 @@ public class MultipleCommandAlias extends Command {
|
||||
this.commands = commands;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the commands associated with the multi-command alias.
|
||||
*
|
||||
* @return commands associated with alias
|
||||
*/
|
||||
public Command[] getCommands() {
|
||||
return commands;
|
||||
}
|
||||
|
@ -75,6 +75,7 @@ public final class PluginCommand extends Command implements PluginIdentifiableCo
|
||||
|
||||
/**
|
||||
* Sets the {@link TabCompleter} to run when tab-completing this command.
|
||||
* <p>
|
||||
* If no TabCompleter is specified, and the command's executor implements
|
||||
* 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>
|
||||
* <br>
|
||||
* This method does not consider permissions.
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* Represents a class which can handle command tab completion and commands
|
||||
*
|
||||
* @deprecated Remains for plugins that would have implemented it even without functionality
|
||||
* @see TabExecutor
|
||||
*/
|
||||
|
@ -5,6 +5,7 @@ package org.bukkit.configuration;
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class InvalidConfigurationException extends Exception {
|
||||
|
||||
/**
|
||||
* Creates a new instance of InvalidConfigurationException without a message or cause.
|
||||
*/
|
||||
|
@ -16,10 +16,12 @@ import java.util.Map;
|
||||
* </ul>
|
||||
* In addition to implementing this interface, you must register the class with
|
||||
* {@link ConfigurationSerialization#registerClass(Class)}.
|
||||
*
|
||||
* @see DelegateDeserialization
|
||||
* @see SerializableAs
|
||||
*/
|
||||
public interface ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
* Creates a Map representation of this class.
|
||||
* <p>
|
||||
|
@ -15,6 +15,7 @@ import java.lang.annotation.Target;
|
||||
* <p>
|
||||
* Using this annotation on any other class than a {@link ConfigurationSerializable} will
|
||||
* have no effect.
|
||||
*
|
||||
* @see ConfigurationSerialization#registerClass(Class, String)
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
public interface AnimalTamer {
|
||||
|
||||
/**
|
||||
* This is the name of the specified AnimalTamer.
|
||||
*
|
||||
|
@ -4,6 +4,7 @@ package org.bukkit.entity;
|
||||
* Represents a single part of a {@link ComplexLivingEntity}
|
||||
*/
|
||||
public interface ComplexEntityPart extends Entity {
|
||||
|
||||
/**
|
||||
* Gets the parent {@link ComplexLivingEntity} of this part.
|
||||
*
|
||||
|
@ -14,10 +14,11 @@ import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
|
||||
public enum EntityType {
|
||||
|
||||
// These strings MUST match the strings in nms.EntityTypes and are case sensitive.
|
||||
/**
|
||||
* An item resting on the ground.
|
||||
*
|
||||
* <p>
|
||||
* Spawn with {@link World#dropItem(Location, ItemStack)}
|
||||
* or {@link World#dropItemNaturally(Location, ItemStack)}
|
||||
*/
|
||||
|
@ -4,6 +4,7 @@ package org.bukkit.entity;
|
||||
* Represents an Experience Orb.
|
||||
*/
|
||||
public interface ExperienceOrb extends Entity {
|
||||
|
||||
/**
|
||||
* Gets how much experience is contained within this orb
|
||||
*
|
||||
|
@ -4,6 +4,7 @@ package org.bukkit.entity;
|
||||
* A representation of an explosive entity
|
||||
*/
|
||||
public interface Explosive extends Entity {
|
||||
|
||||
/**
|
||||
* Set the radius affected by this explosive's explosion
|
||||
*
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.util.Vector;
|
||||
* Represents a Fireball.
|
||||
*/
|
||||
public interface Fireball extends Projectile, Explosive {
|
||||
|
||||
/**
|
||||
* Fireballs fly straight and do not take setVelocity(...) well.
|
||||
*
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.entity;
|
||||
import org.bukkit.inventory.meta.FireworkMeta;
|
||||
|
||||
public interface Firework extends Entity {
|
||||
|
||||
/**
|
||||
* Get a copy of the fireworks meta
|
||||
*
|
||||
|
@ -5,6 +5,7 @@ package org.bukkit.entity;
|
||||
* A wild tameable cat
|
||||
*/
|
||||
public interface Ocelot extends Animals, Tameable {
|
||||
|
||||
/**
|
||||
* Gets the current type of this cat.
|
||||
*
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.event.painting.PaintingBreakEvent;
|
||||
* Represents a Painting.
|
||||
*/
|
||||
public interface Painting extends Hanging {
|
||||
|
||||
/**
|
||||
* Get the art on this painting
|
||||
*
|
||||
|
@ -4,6 +4,7 @@ package org.bukkit.entity;
|
||||
* Represents a Pig Zombie.
|
||||
*/
|
||||
public interface PigZombie extends Zombie {
|
||||
|
||||
/**
|
||||
* Get the pig zombie's current anger level.
|
||||
*
|
||||
|
@ -4,6 +4,7 @@ package org.bukkit.entity;
|
||||
* Represents a Skeleton.
|
||||
*/
|
||||
public interface Skeleton extends Monster {
|
||||
|
||||
/**
|
||||
* Gets the current type of this skeleton.
|
||||
*
|
||||
|
@ -4,6 +4,7 @@ package org.bukkit.entity;
|
||||
* Represents a Primed TNT.
|
||||
*/
|
||||
public interface TNTPrimed extends Explosive {
|
||||
|
||||
/**
|
||||
* Set the number of ticks until the TNT blows up after being primed.
|
||||
*
|
||||
|
@ -4,6 +4,7 @@ package org.bukkit.entity;
|
||||
* Represents a Zombie.
|
||||
*/
|
||||
public interface Zombie extends Monster {
|
||||
|
||||
/**
|
||||
* Gets whether the zombie is a baby
|
||||
*
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.bukkit.event;
|
||||
|
||||
public interface Cancellable {
|
||||
|
||||
/**
|
||||
* Gets the cancellation state of this event. A cancelled event will not
|
||||
* be executed in the server, but will still pass to other plugins
|
||||
|
@ -4,6 +4,7 @@ package org.bukkit.event;
|
||||
* Represents an event's priority in execution
|
||||
*/
|
||||
public enum EventPriority {
|
||||
|
||||
/**
|
||||
* Event call is of very low importance and should be ran first, to allow
|
||||
* other plugins to further customise the outcome
|
||||
|
@ -10,6 +10,7 @@ import java.util.Map.Entry;
|
||||
* A list of event handlers, stored per-event. Based on lahwran's fevents.
|
||||
*/
|
||||
public class HandlerList {
|
||||
|
||||
/**
|
||||
* Handler array. This field being an array is the key to this system's speed.
|
||||
*/
|
||||
|
@ -3,6 +3,9 @@ package org.bukkit.event.entity;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
|
||||
/**
|
||||
* Called when a block causes an entity to combust.
|
||||
*/
|
||||
public class EntityCombustByBlockEvent extends EntityCombustEvent {
|
||||
private final Block combuster;
|
||||
|
||||
|
@ -2,6 +2,9 @@ package org.bukkit.event.entity;
|
||||
|
||||
import org.bukkit.entity.Entity;
|
||||
|
||||
/**
|
||||
* Called when an entity causes another entity to combust.
|
||||
*/
|
||||
public class EntityCombustByEntityEvent extends EntityCombustEvent {
|
||||
private final Entity combuster;
|
||||
|
||||
|
@ -6,9 +6,10 @@ import org.bukkit.entity.Entity;
|
||||
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>
|
||||
* For players see {@link org.bukkit.event.player.PlayerPortalEvent PlayerPortalEvent}
|
||||
* For players see {@link org.bukkit.event.player.PlayerPortalEvent}
|
||||
*/
|
||||
public class EntityPortalEvent extends EntityTeleportEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@ -20,18 +21,52 @@ public class EntityPortalEvent extends EntityTeleportEvent {
|
||||
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) {
|
||||
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() {
|
||||
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() {
|
||||
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) {
|
||||
this.travelAgent = travelAgent;
|
||||
}
|
||||
|
@ -5,6 +5,13 @@ import org.bukkit.entity.Item;
|
||||
import org.bukkit.event.Cancellable;
|
||||
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 {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean canceled;
|
||||
|
@ -4,6 +4,7 @@ package org.bukkit.event.inventory;
|
||||
* What the client did to trigger this action (not the result).
|
||||
*/
|
||||
public enum ClickType {
|
||||
|
||||
/**
|
||||
* The left (or primary) mouse button.
|
||||
*/
|
||||
|
@ -5,6 +5,9 @@ import org.bukkit.inventory.CraftingInventory;
|
||||
import org.bukkit.inventory.InventoryView;
|
||||
import org.bukkit.inventory.Recipe;
|
||||
|
||||
/**
|
||||
* Called when the recipe of an Item is completed inside a crafting matrix.
|
||||
*/
|
||||
public class CraftItemEvent extends InventoryClickEvent {
|
||||
private Recipe recipe;
|
||||
|
||||
|
@ -4,8 +4,10 @@ package org.bukkit.event.inventory;
|
||||
* An estimation of what the result will be.
|
||||
*/
|
||||
public enum InventoryAction {
|
||||
|
||||
/**
|
||||
* Nothing will happen from the click.
|
||||
* <p>
|
||||
* There may be cases where nothing will happen and this is value is
|
||||
* not provided, but it is guaranteed that this value is accurate
|
||||
* when given.
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.bukkit.event.inventory;
|
||||
|
||||
public enum InventoryType {
|
||||
|
||||
/**
|
||||
* A chest inventory, with 0, 9, 18, 27, 36, 45, or 54 slots of type CONTAINER.
|
||||
*/
|
||||
|
@ -7,6 +7,9 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* Called when a player interacts with a Bucket
|
||||
*/
|
||||
public abstract class PlayerBucketEvent extends PlayerEvent implements Cancellable {
|
||||
private ItemStack itemStack;
|
||||
private boolean cancelled = false;
|
||||
|
@ -77,7 +77,7 @@ public class PlayerEditBookEvent extends PlayerEvent implements Cancellable {
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
public void setNewBookMeta(BookMeta newBookMeta) throws IllegalArgumentException {
|
||||
|
@ -6,7 +6,10 @@ import org.bukkit.entity.Player;
|
||||
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 {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@ -23,18 +26,52 @@ public class PlayerPortalEvent extends PlayerTeleportEvent {
|
||||
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) {
|
||||
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() {
|
||||
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() {
|
||||
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) {
|
||||
this.travelAgent = travelAgent;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@ package org.bukkit.event.vehicle;
|
||||
import org.bukkit.entity.Vehicle;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when a vehicle updates
|
||||
*/
|
||||
public class VehicleUpdateEvent extends VehicleEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
|
@ -9,6 +9,7 @@ import org.bukkit.World;
|
||||
* For example, generating glowstone inside the nether or generating dungeons full of treasure
|
||||
*/
|
||||
public abstract class BlockPopulator {
|
||||
|
||||
/**
|
||||
* Populates an area of blocks at or around the given chunk.
|
||||
* <p>
|
||||
|
@ -14,6 +14,7 @@ import org.bukkit.block.Block;
|
||||
* For example, the nether chunk generator should shape netherrack and soulsand
|
||||
*/
|
||||
public abstract class ChunkGenerator {
|
||||
|
||||
/**
|
||||
* Interface to biome data for chunk to be generated: initialized with default values for world type and seed.
|
||||
* <p>
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.bukkit.inventory;
|
||||
|
||||
public interface BeaconInventory extends Inventory {
|
||||
|
||||
/**
|
||||
* Set the item powering the beacon.
|
||||
*
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.inventory;
|
||||
import org.bukkit.block.BrewingStand;
|
||||
|
||||
public interface BrewerInventory extends Inventory {
|
||||
|
||||
/**
|
||||
* Get the current ingredient for brewing.
|
||||
*
|
||||
|
@ -4,6 +4,7 @@ package org.bukkit.inventory;
|
||||
* Interface to the crafting inventories
|
||||
*/
|
||||
public interface CraftingInventory extends Inventory {
|
||||
|
||||
/**
|
||||
* Check what item is in the result slot of this crafting inventory.
|
||||
*
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.inventory;
|
||||
import org.bukkit.block.DoubleChest;
|
||||
|
||||
public interface DoubleChestInventory extends Inventory {
|
||||
|
||||
/**
|
||||
* Get the left half of this double chest.
|
||||
*
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.bukkit.inventory;
|
||||
|
||||
public interface EnchantingInventory extends Inventory {
|
||||
|
||||
/**
|
||||
* Set the item being enchanted.
|
||||
*
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.entity.Entity;
|
||||
* An interface to a creatures inventory
|
||||
*/
|
||||
public interface EntityEquipment {
|
||||
|
||||
/**
|
||||
* Gets a copy of the item the entity is currently holding
|
||||
*
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.inventory;
|
||||
import org.bukkit.block.Furnace;
|
||||
|
||||
public interface FurnaceInventory extends Inventory {
|
||||
|
||||
/**
|
||||
* Get the current item in the result slot.
|
||||
*
|
||||
|
@ -171,21 +171,28 @@ public interface Inventory extends Iterable<ItemStack> {
|
||||
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
|
||||
* This will only match if both the type and the amount of the stack match
|
||||
* Checks if the inventory contains at least the minimum amount specified
|
||||
* 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 amount The amount of stacks to find
|
||||
* @return false if item is null, true if amount less than 1, true if amount of exactly matching ItemStacks were found.
|
||||
* @param item the ItemStack to match against
|
||||
* @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
|
||||
* @see #containsAtLeast(ItemStack, int)
|
||||
*/
|
||||
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 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
|
||||
* @param item the ItemStack to match against
|
||||
* @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
|
||||
*/
|
||||
public boolean containsAtLeast(ItemStack item, int amount);
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.bukkit.inventory;
|
||||
|
||||
public interface InventoryHolder {
|
||||
|
||||
/**
|
||||
* Get the object's inventory.
|
||||
*
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.plugin.Plugin;
|
||||
* Represents an object that may be assigned permissions
|
||||
*/
|
||||
public interface Permissible extends ServerOperator {
|
||||
|
||||
/**
|
||||
* Checks if this object contains an override for the specified permission, by fully qualified name
|
||||
*
|
||||
|
@ -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}
|
||||
*/
|
||||
public interface PermissionRemovedExecutor {
|
||||
|
||||
/**
|
||||
* Called when a {@link PermissionAttachment} is removed from a {@link Permissible}
|
||||
*
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.entity.Player;
|
||||
* Represents an object that may become a server operator, such as a {@link Player}
|
||||
*/
|
||||
public interface ServerOperator {
|
||||
|
||||
/**
|
||||
* Checks if this object is a server operator
|
||||
*
|
||||
|
@ -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")
|
||||
@Deprecated
|
||||
public Potion(PotionType type, Tier tier) {
|
||||
@ -45,14 +47,18 @@ public class Potion {
|
||||
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")
|
||||
@Deprecated
|
||||
public Potion(PotionType type, Tier tier, boolean 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")
|
||||
@Deprecated
|
||||
public Potion(PotionType type, Tier tier, boolean splash, boolean extended) {
|
||||
|
@ -6,6 +6,7 @@ import java.util.Collection;
|
||||
* Represents a brewer that can create {@link PotionEffect}s.
|
||||
*/
|
||||
public interface PotionBrewer {
|
||||
|
||||
/**
|
||||
* Creates a {@link PotionEffect} from the given {@link PotionEffectType},
|
||||
* applying duration modifiers and checks.
|
||||
|
@ -5,7 +5,6 @@ import org.bukkit.plugin.Plugin;
|
||||
/**
|
||||
* Represents a task being executed by the scheduler
|
||||
*/
|
||||
|
||||
public interface BukkitTask {
|
||||
|
||||
/**
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.plugin.Plugin;
|
||||
* </p>
|
||||
* Workers are used to execute async tasks.
|
||||
*/
|
||||
|
||||
public interface BukkitWorker {
|
||||
|
||||
/**
|
||||
|
@ -9,7 +9,6 @@ import java.io.IOException;
|
||||
/**
|
||||
* Class containing file utilities
|
||||
*/
|
||||
|
||||
public class FileUtil {
|
||||
|
||||
/**
|
||||
@ -19,7 +18,6 @@ public class FileUtil {
|
||||
* @param outFile the target filename
|
||||
* @return true on success
|
||||
*/
|
||||
|
||||
public static boolean copy(File inFile, File outFile) {
|
||||
if (!inFile.exists()) {
|
||||
return false;
|
||||
|
@ -23,7 +23,7 @@ public class BukkitObjectInputStream extends ObjectInputStream {
|
||||
*
|
||||
* @throws IOException
|
||||
* @throws SecurityException
|
||||
* @see {@link ObjectInputStream#ObjectInputStream()}
|
||||
* @see ObjectInputStream#ObjectInputStream()
|
||||
*/
|
||||
protected BukkitObjectInputStream() throws IOException, SecurityException {
|
||||
super();
|
||||
@ -35,7 +35,7 @@ public class BukkitObjectInputStream extends ObjectInputStream {
|
||||
*
|
||||
* @param in
|
||||
* @throws IOException
|
||||
* @see {@link ObjectInputStream#ObjectInputStream(InputStream)}
|
||||
* @see ObjectInputStream#ObjectInputStream(InputStream)
|
||||
*/
|
||||
public BukkitObjectInputStream(InputStream in) throws IOException {
|
||||
super(in);
|
||||
|
@ -23,7 +23,7 @@ public class BukkitObjectOutputStream extends ObjectOutputStream {
|
||||
*
|
||||
* @throws IOException
|
||||
* @throws SecurityException
|
||||
* @see {@link ObjectOutputStream#ObjectOutputStream()}
|
||||
* @see ObjectOutputStream#ObjectOutputStream()
|
||||
*/
|
||||
protected BukkitObjectOutputStream() throws IOException, SecurityException {
|
||||
super();
|
||||
@ -35,7 +35,7 @@ public class BukkitObjectOutputStream extends ObjectOutputStream {
|
||||
*
|
||||
* @param out
|
||||
* @throws IOException
|
||||
* @see {@link ObjectOutputStream#ObjectOutputStream(OutputStream)}
|
||||
* @see ObjectOutputStream#ObjectOutputStream(OutputStream)
|
||||
*/
|
||||
public BukkitObjectOutputStream(OutputStream out) throws IOException {
|
||||
super(out);
|
||||
|
Loading…
Reference in New Issue
Block a user