Generic cleanup of warnings, whitespace and style.

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
Bukkit/Spigot
2011-12-25 16:02:30 +01:00
parent 98960fd73e
commit aaab1cba23
257 changed files with 1408 additions and 1152 deletions

View File

@@ -6,6 +6,7 @@ import org.bukkit.event.Cancellable;
/**
* Represents a player animation event
*/
@SuppressWarnings("serial")
public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
private PlayerAnimationType animationType;

View File

@@ -7,6 +7,7 @@ import org.bukkit.event.Cancellable;
/**
* This event is fired when the player is almost about to enter the bed.
*/
@SuppressWarnings("serial")
public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable {
private boolean cancel = false;

View File

@@ -6,6 +6,7 @@ import org.bukkit.entity.Player;
/**
* This event is fired when the player is leaving a bed.
*/
@SuppressWarnings("serial")
public class PlayerBedLeaveEvent extends PlayerEvent {
private Block bed;

View File

@@ -9,9 +9,10 @@ import org.bukkit.inventory.ItemStack;
/**
* Called when a player empties a bucket
*/
@SuppressWarnings("serial")
public class PlayerBucketEmptyEvent extends PlayerBucketEvent {
public PlayerBucketEmptyEvent(Player who, Block blockClicked, BlockFace blockFace, Material bucket, ItemStack itemInHand) {
super(Type.PLAYER_BUCKET_EMPTY, who, blockClicked, blockFace, bucket, itemInHand);
super(Type.PLAYER_BUCKET_EMPTY, who, blockClicked, blockFace, bucket, itemInHand);
}
}

View File

@@ -7,6 +7,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.inventory.ItemStack;
@SuppressWarnings("serial")
public abstract class PlayerBucketEvent extends PlayerEvent implements Cancellable {
private ItemStack itemStack;
@@ -50,7 +51,6 @@ public abstract class PlayerBucketEvent extends PlayerEvent implements Cancellab
this.itemStack = itemStack;
}
/**
* Return the block clicked
*

View File

@@ -9,6 +9,7 @@ import org.bukkit.inventory.ItemStack;
/**
* Called when a player fills a bucket
*/
@SuppressWarnings("serial")
public class PlayerBucketFillEvent extends PlayerBucketEvent {
public PlayerBucketFillEvent(Player who, Block blockClicked, BlockFace blockFace, Material bucket, ItemStack itemInHand) {
super(Type.PLAYER_BUCKET_FILL, who, blockClicked, blockFace, bucket, itemInHand);

View File

@@ -3,6 +3,7 @@ package org.bukkit.event.player;
import org.bukkit.World;
import org.bukkit.entity.Player;
@SuppressWarnings("serial")
public class PlayerChangedWorldEvent extends PlayerEvent {
private final World from;

View File

@@ -10,6 +10,7 @@ import org.bukkit.event.Cancellable;
/**
* Holds information for player chat and commands
*/
@SuppressWarnings("serial")
public class PlayerChatEvent extends PlayerEvent implements Cancellable {
private boolean cancel = false;
private String message;

View File

@@ -6,6 +6,7 @@ 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.
*/
@SuppressWarnings("serial")
public class PlayerCommandPreprocessEvent extends PlayerChatEvent {
public PlayerCommandPreprocessEvent(final Player player, final String message) {
super(Type.PLAYER_COMMAND_PREPROCESS, player, message);

View File

@@ -7,6 +7,7 @@ import org.bukkit.event.Cancellable;
/**
* Thrown when a player drops an item from their inventory
*/
@SuppressWarnings("serial")
public class PlayerDropItemEvent extends PlayerEvent implements Cancellable {
private final Item drop;
private boolean cancel = false;

View File

@@ -7,6 +7,7 @@ import org.bukkit.entity.Player;
/**
* Called when a player throws an egg and it might hatch
*/
@SuppressWarnings("serial")
public class PlayerEggThrowEvent extends PlayerEvent {
private Egg egg;
private boolean hatching;
@@ -44,7 +45,7 @@ public class PlayerEggThrowEvent extends PlayerEvent {
* 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
* false if you want it not to
*/
public void setHatching(boolean hatching) {
this.hatching = hatching;

View File

@@ -6,6 +6,7 @@ import org.bukkit.event.Event;
/**
* Represents a player related event
*/
@SuppressWarnings("serial")
public class PlayerEvent extends Event {
protected Player player;

View File

@@ -7,6 +7,7 @@ import org.bukkit.entity.Entity;
/**
* Thrown when a player is fishing
*/
@SuppressWarnings("serial")
public class PlayerFishEvent extends PlayerEvent implements Cancellable {
private final Entity entity;
private boolean cancel = false;

View File

@@ -4,6 +4,7 @@ import org.bukkit.GameMode;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
@SuppressWarnings("serial")
public class PlayerGameModeChangeEvent extends PlayerEvent implements Cancellable {
private boolean cancelled;

View File

@@ -7,6 +7,7 @@ import org.bukkit.event.Cancellable;
/**
* Represents an event that is called when a player right clicks an entity.
*/
@SuppressWarnings("serial")
public class PlayerInteractEntityEvent extends PlayerEvent implements Cancellable {
protected Entity clickedEntity;
boolean cancelled = false;

View File

@@ -11,6 +11,7 @@ import org.bukkit.event.block.Action;
/**
* Called when a player interacts with an object or air.
*/
@SuppressWarnings("serial")
public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
protected ItemStack item;
protected Action action;
@@ -141,6 +142,7 @@ public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
/**
* This controls the action to take with the block (if any) that was clicked on
* This event gets processed for all blocks, but most don't have a default action
*
* @return the action to take with the interacted block
*/
public Result useInteractedBlock() {
@@ -158,6 +160,7 @@ public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
* This controls the action to take with the item the player is holding
* This includes both blocks and items (such as flint and steel or records)
* When this is set to default, it will be allowed if no action is taken on the interacted block
*
* @return the action to take with the item in hand
*/
public Result useItemInHand() {

View File

@@ -6,6 +6,7 @@ import org.bukkit.inventory.Inventory;
/**
* Represents a player related inventory event
*/
@SuppressWarnings("serial")
public class PlayerInventoryEvent extends PlayerEvent {
protected Inventory inventory;

View File

@@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
/**
* Fired when a player changes their currently held item
*/
@SuppressWarnings("serial")
public class PlayerItemHeldEvent extends PlayerEvent {
private int previous;
private int current;

View File

@@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
/**
* Called when a player joins a server
*/
@SuppressWarnings("serial")
public class PlayerJoinEvent extends PlayerEvent {
private String joinMessage;

View File

@@ -6,6 +6,7 @@ import org.bukkit.event.Cancellable;
/**
* Called when a player gets kicked from the server
*/
@SuppressWarnings("serial")
public class PlayerKickEvent extends PlayerEvent implements Cancellable {
private String leaveMessage;
private String kickReason;

View File

@@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
/**
* Stores details for players attempting to log in
*/
@SuppressWarnings("serial")
public class PlayerLoginEvent extends PlayerEvent {
private Result result;
private String message;

View File

@@ -8,6 +8,7 @@ import org.bukkit.event.Event;
/**
* Holds information for player movement events
*/
@SuppressWarnings("serial")
public class PlayerMoveEvent extends PlayerEvent implements Cancellable {
private boolean cancel = false;
private Location from;

View File

@@ -7,6 +7,7 @@ import org.bukkit.event.Cancellable;
/**
* Thrown when a player picks an item up from the ground
*/
@SuppressWarnings("serial")
public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable {
private final Item item;
private boolean cancel = false;

View File

@@ -7,6 +7,7 @@ import org.bukkit.entity.Player;
/**
* Called when a player completes the portaling process by standing in a portal
*/
@SuppressWarnings("serial")
public class PlayerPortalEvent extends PlayerTeleportEvent {
protected boolean useTravelAgent = true;

View File

@@ -6,6 +6,7 @@ import org.bukkit.event.Event;
/**
* Stores details for players attempting to log in
*/
@SuppressWarnings("serial")
public class PlayerPreLoginEvent extends Event {
private Result result;
private String message;

View File

@@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
/**
* Called when a player leaves a server
*/
@SuppressWarnings("serial")
public class PlayerQuitEvent extends PlayerEvent {
private String quitMessage;

View File

@@ -3,6 +3,7 @@ package org.bukkit.event.player;
import org.bukkit.Location;
import org.bukkit.entity.Player;
@SuppressWarnings("serial")
public class PlayerRespawnEvent extends PlayerEvent {
private Location respawnLocation;
private boolean isBedSpawn;

View File

@@ -7,6 +7,7 @@ import org.bukkit.event.Event;
/**
* Holds information for player teleport events
*/
@SuppressWarnings("serial")
public class PlayerTeleportEvent extends PlayerMoveEvent {
private TeleportCause cause = TeleportCause.UNKNOWN;
@@ -32,6 +33,7 @@ public class PlayerTeleportEvent extends PlayerMoveEvent {
/**
* Gets the cause of this teleportation event
*
* @return Cause of the event
*/
public TeleportCause getCause() {

View File

@@ -6,6 +6,7 @@ import org.bukkit.event.Cancellable;
/**
* Called when a player toggles their sneaking state
*/
@SuppressWarnings("serial")
public class PlayerToggleSneakEvent extends PlayerEvent implements Cancellable {
private boolean isSneaking;
private boolean cancel = false;

View File

@@ -6,6 +6,7 @@ import org.bukkit.event.Cancellable;
/**
* Called when a player toggles their sprinting state
*/
@SuppressWarnings("serial")
public class PlayerToggleSprintEvent extends PlayerEvent implements Cancellable {
private boolean isSprinting;
private boolean cancel = false;

View File

@@ -5,6 +5,7 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.util.Vector;
@SuppressWarnings("serial")
public class PlayerVelocityEvent extends PlayerEvent implements Cancellable {
/**