Pulling all pending Bukkit-JavaDoc changes
By: Edmond Poon <sagaciouszzzz@gmail.com>
This commit is contained in:
@@ -193,7 +193,6 @@ public class HandlerList {
|
||||
* Get a specific plugin's registered listeners associated with this handler list
|
||||
*
|
||||
* @param plugin the plugin to get the listeners of
|
||||
*
|
||||
* @return the list of registered listeners
|
||||
*/
|
||||
public static ArrayList<RegisteredListener> getRegisteredListeners(Plugin plugin) {
|
||||
|
||||
@@ -23,6 +23,7 @@ public class ExpBottleEvent extends ProjectileHitEvent {
|
||||
|
||||
/**
|
||||
* This method indicates if the particle effect should be shown.
|
||||
*
|
||||
* @return true if the effect will be shown, false otherwise
|
||||
*/
|
||||
public boolean getShowEffect() {
|
||||
@@ -32,6 +33,7 @@ public class ExpBottleEvent extends ProjectileHitEvent {
|
||||
/**
|
||||
* This method sets if the particle effect will be shown.
|
||||
* This does not change the experience created.
|
||||
*
|
||||
* @param showEffect
|
||||
* true indicates the effect will be shown,
|
||||
* false indicates no effect will be shown
|
||||
@@ -43,6 +45,7 @@ public class ExpBottleEvent extends ProjectileHitEvent {
|
||||
/**
|
||||
* This method retrieves the amount of experience to be created.
|
||||
* The number indicates a total amount to be divided into orbs.
|
||||
*
|
||||
* @return the total amount of experience to be created
|
||||
*/
|
||||
public int getExperience() {
|
||||
@@ -52,6 +55,7 @@ public class ExpBottleEvent extends ProjectileHitEvent {
|
||||
/**
|
||||
* This method sets the amount of experience to be created.
|
||||
* The number indicates a total amount to be divided into orbs.
|
||||
*
|
||||
* @param exp the total amount of experience to be created
|
||||
*/
|
||||
public void setExperience(final int exp) {
|
||||
|
||||
@@ -6,6 +6,9 @@ import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.block.BlockEvent;
|
||||
import org.bukkit.inventory.BrewerInventory;
|
||||
|
||||
/**
|
||||
* Called when the brewing of the contents inside the Brewing Stand is complete.
|
||||
*/
|
||||
public class BrewEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private BrewerInventory contents;
|
||||
@@ -16,6 +19,11 @@ public class BrewEvent extends BlockEvent implements Cancellable {
|
||||
this.contents = contents;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the contents of the Brewing Stand.
|
||||
*
|
||||
* @return the contents
|
||||
*/
|
||||
public BrewerInventory getContents() {
|
||||
return contents;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ public class InventoryCloseEvent extends InventoryEvent {
|
||||
|
||||
/**
|
||||
* Returns the player involved in this event
|
||||
*
|
||||
* @return Player who is involved in this event
|
||||
*/
|
||||
public final HumanEntity getPlayer() {
|
||||
|
||||
@@ -10,14 +10,14 @@ import org.bukkit.inventory.ItemStack;
|
||||
/**
|
||||
* Called when some entity or block (e.g. hopper) tries to move items
|
||||
* directly from one inventory to another.
|
||||
*
|
||||
* <p>
|
||||
* When this event is called, the initiator may already have removed the item
|
||||
* from the source inventory and is ready to move it into the destination
|
||||
* inventory.
|
||||
*
|
||||
* <p>
|
||||
* If this event is cancelled, the items will be returned to the source
|
||||
* inventory, if needed.
|
||||
*
|
||||
* <p>
|
||||
* If this event is not cancelled, the initiator will try to put the
|
||||
* ItemStack into the destination inventory. If this is not possible and the
|
||||
* ItemStack has not been modified, the source inventory slot will be
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
package org.bukkit.event.inventory;
|
||||
|
||||
import org.bukkit.inventory.InventoryView;
|
||||
@@ -20,6 +19,7 @@ public class InventoryOpenEvent extends InventoryEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Returns the player involved in this event
|
||||
*
|
||||
* @return Player who is involved in this event
|
||||
*/
|
||||
public final HumanEntity getPlayer() {
|
||||
@@ -28,8 +28,8 @@ public class InventoryOpenEvent extends InventoryEvent implements 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
|
||||
*
|
||||
* be executed in the server, but will still pass to other plugins.
|
||||
* <p>
|
||||
* If an inventory open event is cancelled, the inventory screen will not show.
|
||||
*
|
||||
* @return true if this event is cancelled
|
||||
@@ -40,8 +40,8 @@ public class InventoryOpenEvent extends InventoryEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Sets 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.
|
||||
* <p>
|
||||
* If an inventory open event is cancelled, the inventory screen will not show.
|
||||
*
|
||||
* @param cancel true if you wish to cancel this event
|
||||
|
||||
@@ -19,6 +19,7 @@ public class PrepareItemCraftEvent extends InventoryEvent {
|
||||
/**
|
||||
* Get the recipe that has been formed. If this event was triggered by a tool repair, this
|
||||
* will be a temporary shapeless recipe representing the repair.
|
||||
*
|
||||
* @return The recipe being crafted.
|
||||
*/
|
||||
public Recipe getRecipe() {
|
||||
@@ -35,6 +36,7 @@ public class PrepareItemCraftEvent extends InventoryEvent {
|
||||
|
||||
/**
|
||||
* Check if this event was triggered by a tool repair operation rather than a crafting recipe.
|
||||
*
|
||||
* @return True if this is a repair.
|
||||
*/
|
||||
public boolean isRepair() {
|
||||
|
||||
@@ -4,6 +4,9 @@ import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when a player switches to another world.
|
||||
*/
|
||||
public class PlayerChangedWorldEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final World from;
|
||||
@@ -13,6 +16,11 @@ public class PlayerChangedWorldEvent extends PlayerEvent {
|
||||
this.from = from;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the world the player is switching from.
|
||||
*
|
||||
* @return player's previous world
|
||||
*/
|
||||
public World getFrom() {
|
||||
return from;
|
||||
}
|
||||
|
||||
@@ -109,6 +109,7 @@ public class PlayerCommandPreprocessEvent extends PlayerEvent implements Cancell
|
||||
* The set returned is not guaranteed to be mutable and may auto-populate on access.
|
||||
* Any listener accessing the returned set should be aware that it may reduce performance for a lazy set implementation.
|
||||
* Listeners should be aware that modifying the list may throw {@link UnsupportedOperationException} if the event caller provides an unmodifiable set.
|
||||
*
|
||||
* @deprecated This method is provided for backward compatibility with no guarantee to the effect of viewing or modifying the set.
|
||||
* @return All Players who will see this chat message
|
||||
*/
|
||||
|
||||
@@ -47,6 +47,7 @@ public class PlayerFishEvent extends PlayerEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Gets the fishing hook.
|
||||
*
|
||||
* @return Fish the entity representing the fishing hook/bobber.
|
||||
*/
|
||||
public Fish getHook() {
|
||||
|
||||
@@ -5,6 +5,9 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when the GameMode of the player is changed.
|
||||
*/
|
||||
public class PlayerGameModeChangeEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancelled;
|
||||
@@ -23,6 +26,11 @@ public class PlayerGameModeChangeEvent extends PlayerEvent implements Cancellabl
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the GameMode the player is switched to.
|
||||
*
|
||||
* @return player's new GameMode
|
||||
*/
|
||||
public GameMode getNewGameMode() {
|
||||
return newGameMode;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
|
||||
private ItemStack item;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param player the player consuming
|
||||
* @param item the ItemStack being consumed
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user