Whitespace + general cleanup

This commit is contained in:
Erik Broes
2011-05-14 23:22:54 +02:00
parent 4e0d676b2c
commit c4d444ce98
216 changed files with 1649 additions and 1637 deletions

View File

@@ -56,4 +56,4 @@ public class CreatureSpawnEvent extends EntityEvent implements Cancellable {
public CreatureType getCreatureType() {
return creatureType;
}
}
}

View File

@@ -56,34 +56,33 @@ public class CreeperPowerEvent extends EntityEvent implements Cancellable {
return bolt;
}
/**
* Gets the cause of the creeper being (un)powered.
* @return A PowerCause value detailing the cause of change in power.
*/
/**
* Gets the cause of the creeper being (un)powered.
* @return A PowerCause value detailing the cause of change in power.
*/
public PowerCause getCause() {
return cause;
}
/**
* An enum to specify the cause of the change in power
*/
public enum PowerCause {
/**
* Power change caused by a lightning bolt
* Powered state: true
*/
LIGHTNING,
/**
* An enum to specify the cause of the change in power
*/
public enum PowerCause {
/**
* Power change caused by something else (probably a plugin)
* Powered state: true
*/
SET_ON,
/**
* Power change caused by something else (probably a plugin)
* Powered state: false
*/
SET_OFF
}
/**
* Power change caused by a lightning bolt
* Powered state: true
*/
LIGHTNING,
/**
* Power change caused by something else (probably a plugin)
* Powered state: true
*/
SET_ON,
/**
* Power change caused by something else (probably a plugin)
* Powered state: false
*/
SET_OFF
}
}

View File

@@ -20,9 +20,7 @@ public class EntityDamageByBlockEvent extends EntityDamageEvent implements Cance
* Returns the block that damaged the player.
* @return Block that damaged the player
*/
public Block getDamager()
{
public Block getDamager() {
return damager;
}
}

View File

@@ -19,9 +19,7 @@ public class EntityDamageByEntityEvent extends EntityDamageEvent implements Canc
* Returns the entity that damaged the defender.
* @return Entity that damaged the defender.
*/
public Entity getDamager()
{
public Entity getDamager() {
return damager;
}
}

View File

@@ -13,6 +13,7 @@ public class EntityDamageByProjectileEvent extends EntityDamageByEntityEvent {
super(damager, damagee, cause, damage);
this.projectile = projectile;
Random random = new Random();
this.bounce = random.nextBoolean();
}
@@ -24,12 +25,11 @@ public class EntityDamageByProjectileEvent extends EntityDamageByEntityEvent {
return projectile;
}
public void setBounce(boolean bounce){
public void setBounce(boolean bounce) {
this.bounce = bounce;
}
public boolean getBounce(){
public boolean getBounce() {
return bounce;
}
}

View File

@@ -13,15 +13,13 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
private boolean cancelled;
private DamageCause cause;
public EntityDamageEvent(Entity damagee, DamageCause cause, int damage)
{
public EntityDamageEvent(Entity damagee, DamageCause cause, int damage) {
super(Event.Type.ENTITY_DAMAGE, damagee);
this.cause = cause;
this.damage = damage;
}
protected EntityDamageEvent(Event.Type type, Entity damagee, DamageCause cause, int damage)
{
protected EntityDamageEvent(Event.Type type, Entity damagee, DamageCause cause, int damage) {
super(type, damagee);
this.cause = cause;
this.damage = damage;
@@ -57,8 +55,7 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
* Gets the amount of damage caused by the Block
* @return The amount of damage caused by the Block
*/
public int getDamage()
{
public int getDamage() {
return damage;
}
@@ -74,16 +71,15 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
* Gets the cause of the damage.
* @return A DamageCause value detailing the cause of the damage.
*/
public DamageCause getCause()
{
public DamageCause getCause() {
return cause;
}
/**
* An enum to specify the cause of the damage
*/
public enum DamageCause
{
public enum DamageCause {
/**
* Damage caused when an entity contacts a block such as a Cactus.
*
@@ -152,7 +148,7 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
VOID,
/**
* Damage caused by being struck by lightning
*
*
* Damage: 5
*/
LIGHTNING,

View File

@@ -1,4 +1,3 @@
package org.bukkit.event.entity;
import java.util.List;

View File

@@ -9,8 +9,7 @@ import org.bukkit.event.Event;
public class EntityEvent extends Event {
protected Entity entity;
public EntityEvent(final Event.Type type, final Entity what)
{
public EntityEvent(final Event.Type type, final Entity what) {
super(type);
entity = what;
}
@@ -19,8 +18,7 @@ public class EntityEvent extends Event {
* Returns the Entity involved in this event
* @return Entity who is involved in this event
*/
public final Entity getEntity()
{
public final Entity getEntity() {
return entity;
}
}

View File

@@ -1,4 +1,3 @@
package org.bukkit.event.entity;
import java.util.List;
@@ -17,7 +16,7 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable {
private List<Block> blocks;
private float yield = 0.3F;
public EntityExplodeEvent (Entity what, Location location, List<Block> blocks) {
public EntityExplodeEvent(Entity what, Location location, List<Block> blocks) {
super(Type.ENTITY_EXPLODE, what);
this.location = location;
this.cancel = false;
@@ -51,12 +50,12 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable {
/**
* Returns the percentage of blocks to drop from this explosion
* @return
* @return
*/
public float getYield() {
return yield;
}
/**
* Sets the percentage of blocks to drop from this explosion
*/

View File

@@ -11,7 +11,7 @@ import org.bukkit.event.Cancellable;
*/
public class EntityInteractEvent extends EntityEvent implements Cancellable {
protected Block block;
private boolean cancelled;
public EntityInteractEvent(Entity entity, Block block) {
@@ -51,4 +51,4 @@ public class EntityInteractEvent extends EntityEvent implements Cancellable {
public Block getBlock() {
return block;
}
}
}

View File

@@ -8,42 +8,29 @@ import org.bukkit.event.painting.PaintingBreakEvent;
* Handles all events fired in relation to entities
*/
public class EntityListener implements Listener {
public EntityListener() {
}
public EntityListener() {}
public void onCreatureSpawn(CreatureSpawnEvent event) {
}
public void onCreatureSpawn(CreatureSpawnEvent event) {}
public void onEntityCombust(EntityCombustEvent event) {
}
public void onEntityCombust(EntityCombustEvent event) {}
public void onEntityDamage(EntityDamageEvent event) {
}
public void onEntityDamage(EntityDamageEvent event) {}
public void onEntityExplode(EntityExplodeEvent event) {
}
public void onEntityExplode(EntityExplodeEvent event) {}
public void onExplosionPrime(ExplosionPrimeEvent event) {
}
public void onExplosionPrime(ExplosionPrimeEvent event) {}
public void onEntityDeath(EntityDeathEvent event) {
}
public void onEntityDeath(EntityDeathEvent event) {}
public void onEntityTarget(EntityTargetEvent event) {
}
public void onEntityTarget(EntityTargetEvent event) {}
public void onEntityInteract(EntityInteractEvent event) {
}
public void onEntityInteract(EntityInteractEvent event) {}
public void onPaintingPlace(PaintingPlaceEvent event){
}
public void onPaintingPlace(PaintingPlaceEvent event) {}
public void onPaintingBreak(PaintingBreakEvent event){
}
public void onPaintingBreak(PaintingBreakEvent event) {}
public void onPigZap(PigZapEvent event) {
}
public void onPigZap(PigZapEvent event) {}
public void onCreeperPower(CreeperPowerEvent event) {
}
public void onCreeperPower(CreeperPowerEvent event) {}
}

View File

@@ -66,8 +66,8 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable {
/**
* An enum to specify the reason for the targeting
*/
public enum TargetReason
{
public enum TargetReason {
/**
* When the entity's target has died, and so it no longer targets it
*/

View File

@@ -22,11 +22,11 @@ public class ExplosionPrimeEvent extends EntityEvent implements Cancellable {
public void setCancelled(boolean cancel) {
this.cancel = cancel;
}
public float getRadius() {
return radius;
}
public void setRadius(float radius) {
this.radius = radius;
}
@@ -38,5 +38,4 @@ public class ExplosionPrimeEvent extends EntityEvent implements Cancellable {
public void setFire(boolean fire) {
this.fire = fire;
}
}