More JavaDoc improvements.

By: EvilSeph <evilseph@unaligned.org>
This commit is contained in:
Bukkit/Spigot
2011-06-24 02:32:04 -04:00
parent 0630db640b
commit c54128077a
56 changed files with 435 additions and 139 deletions

View File

@@ -2,17 +2,16 @@ package org.bukkit.event.player;
import org.bukkit.entity.Player;
/*
/**
* Represents a player animation event
*/
public class PlayerAnimationEvent extends PlayerEvent {
private PlayerAnimationType animationType;
/*
* Construct a new event
/**
* Construct a new PlayerAnimation event
*
* @param type The event type
* @param player The player instance
*/
public PlayerAnimationEvent(final Player player) {
@@ -22,10 +21,10 @@ public class PlayerAnimationEvent extends PlayerEvent {
animationType = PlayerAnimationType.ARM_SWING;
}
/*
/**
* Get the type of this animation event
*
* @returns the animation type
* @return the animation type
*/
public PlayerAnimationType getAnimationType() {
return animationType;

View File

@@ -1,7 +1,7 @@
package org.bukkit.event.player;
/*
* Differet types of player animations
/**
* Different types of player animations
*/
public enum PlayerAnimationType {
ARM_SWING

View File

@@ -7,8 +7,6 @@ import org.bukkit.event.Cancellable;
/**
* This event is fired when the player is almost about to enter the bed.
* It can be cancelled.
*
* @author sk89q
*/
public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable {
@@ -21,7 +19,8 @@ public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable {
}
/**
* Gets the cancellation state of this event.
* Gets the cancellation state of this event. A cancelled event will not
* be executed in the server, but will still pass to other plugins
*
* @return true if this event is cancelled
*/
@@ -30,7 +29,8 @@ public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable {
}
/**
* Prevents the player from entering the bed.
* Sets the cancellation state of this event. A cancelled event will not
* be executed in the server, but will still pass to other plugins
*
* @param cancel true if you wish to cancel this event
*/
@@ -39,9 +39,9 @@ public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable {
}
/**
* Returns the bed block.
* Returns the bed block involved in this event.
*
* @return
* @return the bed block involved in this event
*/
public Block getBed() {
return bed;

View File

@@ -5,8 +5,6 @@ import org.bukkit.entity.Player;
/**
* This event is fired when the player is leaving a bed.
*
* @author sk89q
*/
public class PlayerBedLeaveEvent extends PlayerEvent {
@@ -18,9 +16,9 @@ public class PlayerBedLeaveEvent extends PlayerEvent {
}
/**
* Returns the bed block.
* Returns the bed block involved in this event.
*
* @return
* @return the bed block involved in this event
*/
public Block getBed() {
return bed;

View File

@@ -2,6 +2,10 @@ package org.bukkit.event.player;
import org.bukkit.entity.Player;
/**
* Called early in the command handling process. This event is only
* for very exceptional cases and you should not normally use it.
*/
public class PlayerCommandPreprocessEvent extends PlayerChatEvent {
public PlayerCommandPreprocessEvent(final Player player, final String message) {
super(Type.PLAYER_COMMAND_PREPROCESS, player, message);

View File

@@ -19,7 +19,7 @@ public class PlayerDropItemEvent extends PlayerEvent implements Cancellable {
/**
* Gets the ItemDrop created by the player
*
* @return ItemDrop
* @return ItemDrop created by the player
*/
public Item getItemDrop() {
return drop;

View File

@@ -5,9 +5,7 @@ import org.bukkit.entity.Egg;
import org.bukkit.entity.Player;
/**
*
* @author tkelly
*
* Called when a player throws an egg and it might hatch
*/
public class PlayerEggThrowEvent extends PlayerEvent {
private Egg egg;
@@ -24,16 +22,16 @@ public class PlayerEggThrowEvent extends PlayerEvent {
}
/**
* Get the egg.
* Gets the egg involved in this event.
*
* @return the egg
* @return the egg involved in this event
*/
public Egg getEgg() {
return egg;
}
/**
* Grabs whether the egg is hatching or not. Will be what the server
* Gets whether the egg is hatching or not. Will be what the server
* would've done without interaction.
*
* @return boolean Whether the egg is going to hatch or not
@@ -43,7 +41,7 @@ public class PlayerEggThrowEvent extends PlayerEvent {
}
/**
* Sets whether the egg will hatch.
* Sets whether the egg will hatch or not.
*
* @param hatching true if you want the egg to hatch
* false if you want it not to

View File

@@ -16,6 +16,7 @@ public class PlayerEvent extends Event {
/**
* Returns the player involved in this event
*
* @return Player who is involved in this event
*/
public final Player getPlayer() {

View File

@@ -9,9 +9,7 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.block.Action;
/**
*
* @author durron597
*
* Called when a player interacts with an object or air.
*/
public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
protected ItemStack item;
@@ -93,7 +91,7 @@ public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
/**
* Check if this event involved a block
*
* return boolean true if it did
* @return boolean true if it did
*/
public boolean hasBlock() {
return this.blockClicked != null;
@@ -102,7 +100,7 @@ public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
/**
* Check if this event involved an item
*
* return boolean true if it did
* @return boolean true if it did
*/
public boolean hasItem() {
return this.item != null;

View File

@@ -2,6 +2,9 @@ package org.bukkit.event.player;
import org.bukkit.entity.Player;
/**
* Called when a player joins a server
*/
public class PlayerJoinEvent extends PlayerEvent {
private String joinMessage;

View File

@@ -3,6 +3,9 @@ package org.bukkit.event.player;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
/**
* Called when a player gets kicked from the server
*/
public class PlayerKickEvent extends PlayerEvent implements Cancellable {
private String leaveMessage;
private String kickReason;

View File

@@ -66,7 +66,7 @@ public class PlayerListener implements Listener {
public void onPlayerRespawn(PlayerRespawnEvent event) {}
/**
* Called when a player interacts
* Called when a player interacts with an object or air.
*
* @param event Relevant event details
*/

View File

@@ -76,9 +76,9 @@ public class PlayerPreLoginEvent extends Event {
}
/**
* Gets the player name.
* Gets the player's name.
*
* @return
* @return the player's name
*/
public String getName() {
return name;

View File

@@ -2,6 +2,9 @@ package org.bukkit.event.player;
import org.bukkit.entity.Player;
/**
* Called when a player leaves a server
*/
public class PlayerQuitEvent extends PlayerEvent {
private String quitMessage;

View File

@@ -32,9 +32,9 @@ public class PlayerRespawnEvent extends PlayerEvent {
}
/**
* Gets whether the respawn location is the players bed.
* Gets whether the respawn location is the player's bed.
*
* @return true if the respawn location is the players bed.
* @return true if the respawn location is the player's bed.
*/
public boolean isBedSpawn() {
return this.isBedSpawn;

View File

@@ -4,8 +4,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
/**
*
* @author azi
* Called when a player toggles their sneaking state
*/
public class PlayerToggleSneakEvent extends PlayerEvent implements Cancellable {
private boolean isSneaking;
@@ -17,8 +16,8 @@ public class PlayerToggleSneakEvent extends PlayerEvent implements Cancellable {
}
/**
* Returns whether the player is now sneaking.
*
* Returns whether the player is now sneaking or not.
*
* @return sneaking state
*/
public boolean isSneaking() {