General cleanup (deprecated+whitespace)

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
Bukkit/Spigot
2011-02-02 00:02:08 +01:00
parent b01fc3ffa8
commit 474817bf11
27 changed files with 224 additions and 244 deletions

View File

@@ -1,5 +1,5 @@
/**
*
*
*/
package org.bukkit.event.block;
@@ -22,7 +22,7 @@ public class BlockCanBuildEvent extends BlockEvent {
/**
* Returns whether or not the block can be built here. By default, returns
* Minecraft's answer on whether the block can be built
*
*
* @return boolean whether or not the block can be built
*/
public boolean isBuildable() {

View File

@@ -22,7 +22,7 @@ public class BlockDamageEvent extends BlockEvent implements Cancellable {
/**
* Returns the player doing the damage
*
*
* @return
*/
public Player getPlayer() {
@@ -31,7 +31,7 @@ public class BlockDamageEvent extends BlockEvent implements Cancellable {
/**
* Returns the level of damage to the block
*
*
* @return
*/
public BlockDamageLevel getDamageLevel() {

View File

@@ -6,7 +6,7 @@ import org.bukkit.event.Event;
/**
* Thrown when a block physics check is called
*
*
* @author Dinnerbone
*/
public class BlockPhysicsEvent extends BlockEvent {

View File

@@ -55,39 +55,39 @@ public class BlockPlaceEvent extends BlockEvent implements Cancellable {
public Player getPlayer() {
return player;
}
/**
* Clarity method for getting the placed block. Not really needed
* except for reasons of clarity
*
*
* @return Block the block that was placed
*/
public Block getBlockPlaced() {
return getBlock();
}
/**
* Returns the state of the block which was replaced. Material type air mostly.
*
* Returns the state of the block which was replaced. Material type air mostly.
*
* @return BlockState of block which was replaced.
*/
public BlockState getBlockReplacedState() {
return this.replacedBlockState;
}
/**
* Get the block that this block was placed against
*
*
* @return Block the block that the new block was placed against
*/
public Block getBlockAgainst() {
return placedAgainst;
}
/**
* Returns the item in your hand when you placed the block
*
*
* @return ItemStack the item in your hand when placing the block
*/
public ItemStack getItemInHand() {
@@ -100,16 +100,16 @@ public class BlockPlaceEvent extends BlockEvent implements Cancellable {
* player is in Spawn). Note that this is an entirely different check
* than BLOCK_CANBUILD, as this refers to a player, not universe-physics
* rule like cactus on dirt.
*
*
* @return boolean whether the server would allow a player to build here
*/
public boolean canBuild() {
return this.canBuild;
}
/**
* Sets the canBuild state of this event. Set to true if you want the
* player to be able to build.
* player to be able to build.
*/
public void setBuild(boolean canBuild) {
this.canBuild = canBuild;

View File

@@ -15,7 +15,7 @@ import org.bukkit.block.BlockFace;
public class BlockRedstoneEvent extends BlockFromToEvent {
private int oldCurrent;
private int newCurrent;
public BlockRedstoneEvent(Block block, BlockFace face, int oldCurrent, int newCurrent) {
super(Type.REDSTONE_CHANGE, block, face);
this.oldCurrent = oldCurrent;

View File

@@ -30,17 +30,17 @@ public class BlockRightClickEvent extends BlockEvent {
public Player getPlayer() {
return player;
}
/**
* Get the block that this block was placed against
*
*
* @return Block the block that the new block was placed against
*/
public Block getBlockAgainst() {
return clickedBlock;
}
/**
* @return BlockFace the direction this block was clicked
*/
@@ -50,7 +50,7 @@ public class BlockRightClickEvent extends BlockEvent {
/**
* Returns the item in your hand when you placed the block
*
*
* @return ItemStack the item in your hand when placing the block
*/
public ItemStack getItemInHand() {

View File

@@ -16,7 +16,7 @@ public class EntityDamageByEntityEvent extends EntityDamageEvent implements Canc
super(Event.Type.ENTITY_DAMAGEDBY_ENTITY, damagee, cause, damage);
this.damager = damager;
}
protected EntityDamageByEntityEvent(Type damageType, Entity damager, Entity damagee, DamageCause cause, int damage)
{
super(damageType, damagee, cause, damage);

View File

@@ -6,30 +6,30 @@ import org.bukkit.entity.Player;
* Represents a player animation event
*/
public class PlayerAnimationEvent extends PlayerEvent {
private PlayerAnimationType animationType;
/*
* Construct a new event
*
*
* @param type The event type
* @param player The player instance
*/
public PlayerAnimationEvent(final Type type, final Player player) {
super(type, player);
// Only supported animation type for now:
animationType = PlayerAnimationType.ARM_SWING;
}
/*
* Get the type of this animation event
*
*
* @returns the animation type
*/
public PlayerAnimationType getAnimationType()
{
return animationType;
}
}

View File

@@ -26,7 +26,7 @@ public class PlayerEggThrowEvent extends PlayerEvent {
/**
* Get the egg.
*
*
* @return the egg
*/
public Egg getEgg() {

View File

@@ -57,10 +57,10 @@ public class PlayerListener implements Listener {
*/
public void onPlayerTeleport(PlayerMoveEvent event) {
}
/**
* Called when a player uses an item
*
*
* @param event Relevant event details
*/
public void onPlayerItem(PlayerItemEvent event) {
@@ -81,10 +81,10 @@ public class PlayerListener implements Listener {
*/
public void onPlayerEggThrow(PlayerEggThrowEvent event) {
}
/**
* Called when a player plays an animation, such as an arm swing
*
*
* @param event Relevant event details
*/
public void onPlayerAnimation(PlayerAnimationEvent event) {