Generic cleanup of warnings, whitespace and style.
This commit is contained in:
@@ -7,9 +7,10 @@ import org.bukkit.event.Cancellable;
|
||||
|
||||
/**
|
||||
* Called when a creature is spawned into a world.
|
||||
*<p />
|
||||
* <p />
|
||||
* If a Creature Spawn event is cancelled, the creature will not spawn.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class CreatureSpawnEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
private Location location;
|
||||
|
||||
@@ -5,9 +5,10 @@ import org.bukkit.event.Cancellable;
|
||||
|
||||
/**
|
||||
* Called when a Creeper is struck by lightning.
|
||||
*<p />
|
||||
* <p />
|
||||
* If a Creeper Power event is cancelled, the Creeper will not be powered.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class CreeperPowerEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
private boolean canceled;
|
||||
|
||||
@@ -4,6 +4,7 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class EndermanPickupEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
private boolean cancel;
|
||||
|
||||
@@ -4,6 +4,7 @@ import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class EndermanPlaceEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
private boolean cancel;
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.event.entity;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityCombustByBlockEvent extends EntityCombustEvent {
|
||||
|
||||
private Block combuster;
|
||||
@@ -16,6 +17,7 @@ public class EntityCombustByBlockEvent extends EntityCombustEvent {
|
||||
* The combuster can be lava or a block that is on fire.
|
||||
*
|
||||
* WARNING: block may be null.
|
||||
*
|
||||
* @return the Block that set the combustee alight.
|
||||
*/
|
||||
public Block getCombuster() {
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.bukkit.event.entity;
|
||||
|
||||
import org.bukkit.entity.Entity;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityCombustByEntityEvent extends EntityCombustEvent {
|
||||
|
||||
private Entity combuster;
|
||||
@@ -13,6 +14,7 @@ public class EntityCombustByEntityEvent extends EntityCombustEvent {
|
||||
|
||||
/**
|
||||
* The combuster can be a WeatherStorm a Blaze, or an Entity holding a FIRE_ASPECT enchanted item.
|
||||
*
|
||||
* @return the Entity that set the combustee alight.
|
||||
*/
|
||||
public Entity getCombuster() {
|
||||
|
||||
@@ -5,9 +5,10 @@ import org.bukkit.event.Cancellable;
|
||||
|
||||
/**
|
||||
* Called when an entity combusts.
|
||||
*<p />
|
||||
* <p />
|
||||
* If an Entity Combust event is cancelled, the entity will not combust.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityCombustEvent extends EntityEvent implements Cancellable {
|
||||
private int duration;
|
||||
private boolean cancel;
|
||||
@@ -37,6 +38,7 @@ public class EntityCombustEvent extends EntityEvent implements Cancellable {
|
||||
* The number of seconds the combustee should be alight for.
|
||||
*
|
||||
* This value will only ever increase the combustion time, not decrease existing combustion times.
|
||||
*
|
||||
* @param duration the time in seconds to be alight for.
|
||||
*/
|
||||
public void setDuration(int duration) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.bukkit.entity.Entity;
|
||||
/**
|
||||
* Called when an entity is damaged by a block
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityDamageByBlockEvent extends EntityDamageEvent {
|
||||
|
||||
private Block damager;
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.bukkit.entity.Entity;
|
||||
/**
|
||||
* Called when an entity is damaged by an entity
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityDamageByEntityEvent extends EntityDamageEvent {
|
||||
|
||||
private Entity damager;
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.bukkit.entity.Projectile;
|
||||
*
|
||||
* @deprecated use {@link EntityDamageByEntityEvent} instead, where {@link EntityDamageByEntityEvent#getDamager()} will return the {@link Projectile}
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
@Deprecated
|
||||
public class EntityDamageByProjectileEvent extends EntityDamageByEntityEvent {
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.bukkit.event.Event;
|
||||
/**
|
||||
* Stores data for damage events
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityDamageEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
private int damage;
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
/**
|
||||
* Thrown whenever a LivingEntity dies
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityDeathEvent extends EntityEvent {
|
||||
private List<ItemStack> drops;
|
||||
private int dropExp = 0;
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.bukkit.event.Event;
|
||||
/**
|
||||
* Represents an Entity-related event
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityEvent extends Event {
|
||||
protected Entity entity;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.util.List;
|
||||
/**
|
||||
* Called when an entity explodes
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityExplodeEvent extends EntityEvent implements Cancellable {
|
||||
private boolean cancel;
|
||||
private Location location;
|
||||
@@ -40,6 +41,7 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable {
|
||||
/**
|
||||
* Returns the list of blocks that would have been removed or were
|
||||
* removed from the explosion event.
|
||||
*
|
||||
* @return All blown-up blocks
|
||||
*/
|
||||
public List<Block> blockList() {
|
||||
@@ -50,6 +52,7 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable {
|
||||
* Returns the location where the explosion happened.
|
||||
* It is not possible to get this value from the Entity as
|
||||
* the Entity no longer exists in the world.
|
||||
*
|
||||
* @return The location of the explosion
|
||||
*/
|
||||
public Location getLocation() {
|
||||
@@ -67,6 +70,7 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Sets the percentage of blocks to drop from this explosion
|
||||
*
|
||||
* @param yield The new yield percentage
|
||||
*/
|
||||
public void setYield(float yield) {
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.bukkit.event.Cancellable;
|
||||
/**
|
||||
* Called when an entity interacts with an object
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityInteractEvent extends EntityEvent implements Cancellable {
|
||||
protected Block block;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ public class EntityListener implements Listener {
|
||||
|
||||
/**
|
||||
* Called when a creature is spawned into a world.
|
||||
*<p />
|
||||
* <p />
|
||||
* If a Creature Spawn event is cancelled, the creature will not spawn.
|
||||
*
|
||||
* @param event Relevant event details
|
||||
@@ -28,7 +28,7 @@ public class EntityListener implements Listener {
|
||||
|
||||
/**
|
||||
* Called when an entity combusts.
|
||||
*<p />
|
||||
* <p />
|
||||
* If an Entity Combust event is cancelled, the entity will not combust.
|
||||
*
|
||||
* @param event Relevant event details
|
||||
@@ -107,7 +107,7 @@ public class EntityListener implements Listener {
|
||||
|
||||
/**
|
||||
* Called when a Creeper is struck by lightning.
|
||||
*<p />
|
||||
* <p />
|
||||
* If a Creeper Power event is cancelled, the Creeper will not be powered.
|
||||
*
|
||||
* @param event Relevant event details
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package org.bukkit.event.entity;
|
||||
|
||||
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.Location;
|
||||
|
||||
/**
|
||||
* Stores data for entities standing inside a portal block
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityPortalEnterEvent extends EntityEvent {
|
||||
|
||||
private Location location;
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.bukkit.event.Event;
|
||||
/**
|
||||
* Stores data for health-regain events
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityRegainHealthEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
private boolean cancelled;
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.bukkit.event.Cancellable;
|
||||
/**
|
||||
* Thrown when a LivingEntity is tamed
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityTameEvent extends EntityEvent implements Cancellable {
|
||||
private boolean cancelled;
|
||||
private AnimalTamer owner;
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.bukkit.event.Cancellable;
|
||||
/**
|
||||
* Called when a creature targets or untargets another entity
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityTargetEvent extends EntityEvent implements Cancellable {
|
||||
private boolean cancel;
|
||||
private Entity target;
|
||||
@@ -28,6 +29,7 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Returns the reason for the targeting
|
||||
*
|
||||
* @return The reason
|
||||
*/
|
||||
public TargetReason getReason() {
|
||||
@@ -38,6 +40,7 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable {
|
||||
* Get the entity that this is targeting.
|
||||
* This will be null in the case that the event is called when
|
||||
* the mob forgets its target.
|
||||
*
|
||||
* @return The entity
|
||||
*/
|
||||
public Entity getTarget() {
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.bukkit.event.Cancellable;
|
||||
/**
|
||||
* Called when an entity has made a decision to explode.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ExplosionPrimeEvent extends EntityEvent implements Cancellable {
|
||||
private boolean cancel;
|
||||
private float radius;
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.bukkit.event.Cancellable;
|
||||
/**
|
||||
* Called when a human entity's food level changes
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class FoodLevelChangeEvent extends EntityEvent implements Cancellable {
|
||||
private boolean cancel = false;
|
||||
private int level;
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.bukkit.event.Cancellable;
|
||||
/**
|
||||
* Called when an item is spawned into a world
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ItemSpawnEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
private Location location;
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.bukkit.event.Cancellable;
|
||||
/**
|
||||
* Stores data for pigs being zapped
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PigZapEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
private boolean canceled;
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
/**
|
||||
* Thrown whenever a {@link Player} dies
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
private int newExp = 0;
|
||||
private String deathMessage = "";
|
||||
@@ -53,7 +54,7 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
* <p>
|
||||
* This does not indicate how much EXP should be dropped, please see
|
||||
* {@link #setDroppedExp(int)} for that.
|
||||
*
|
||||
*
|
||||
* @get exp New EXP of the respawned player
|
||||
*/
|
||||
public void setNewExp(int exp) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.bukkit.entity.Projectile;
|
||||
/**
|
||||
* Called when a projectile hits an object
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ProjectileHitEvent extends EntityEvent {
|
||||
|
||||
public ProjectileHitEvent(Projectile projectile) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.bukkit.event.Cancellable;
|
||||
/**
|
||||
* Called when a Slime splits into smaller Slimes upon death
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class SlimeSplitEvent extends EntityEvent implements Cancellable {
|
||||
private boolean cancel;
|
||||
private int count;
|
||||
|
||||
Reference in New Issue
Block a user