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

@@ -7,7 +7,7 @@ package org.bukkit.entity;
public interface Animals extends Creature {
/**
* Gets the age of this animal.
*
*
* @return Age
*/
public int getAge();

View File

@@ -4,5 +4,5 @@ package org.bukkit.entity;
* Represents a Blaze monster
*/
public interface Blaze extends Monster {
}

View File

@@ -18,11 +18,11 @@ public interface Boat extends Vehicle {
* @param speed The max speed.
*/
public void setMaxSpeed(double speed);
/**
* Gets the deceleration rate (newSpeed = curSpeed * rate) of occupied
* boats. The default is 0.2.
*
*
* @return
*/
public double getOccupiedDeceleration();
@@ -31,7 +31,7 @@ public interface Boat extends Vehicle {
* Sets the deceleration rate (newSpeed = curSpeed * rate) of occupied
* boats. Setting this to a higher value allows for quicker acceleration.
* The default is 0.2.
*
*
* @param speed deceleration rate
*/
public void setOccupiedDeceleration(double rate);
@@ -40,7 +40,7 @@ public interface Boat extends Vehicle {
* Gets the deceleration rate (newSpeed = curSpeed * rate) of unoccupied
* boats. The default is -1. Values below 0 indicate that no additional
* deceleration is imposed.
*
*
* @return
*/
public double getUnoccupiedDeceleration();
@@ -50,21 +50,21 @@ public interface Boat extends Vehicle {
* boats. Setting this to a higher value allows for quicker deceleration
* of boats when a player disembarks. The default is -1. Values below 0
* indicate that no additional deceleration is imposed.
*
*
* @param rate deceleration rate
*/
public void setUnoccupiedDeceleration(double rate);
/**
* Get whether boats can work on land.
*
*
* @return whether boats can work on land
*/
public boolean getWorkOnLand();
/**
* Set whether boats can work on land.
*
*
* @param workOnLand whether boats can work on land
*/
public void setWorkOnLand(boolean workOnLand);

View File

@@ -6,7 +6,7 @@ package org.bukkit.entity;
public interface ComplexEntityPart extends Entity {
/**
* Gets the parent {@link ComplexLivingEntity} of this part.
*
*
* @return Parent complex entity
*/
public ComplexLivingEntity getParent();

View File

@@ -8,7 +8,7 @@ import java.util.Set;
public interface ComplexLivingEntity extends LivingEntity {
/**
* Gets a list of parts that belong to this complex entity
*
*
* @return List of parts
*/
public Set<ComplexEntityPart> getParts();

View File

@@ -50,7 +50,7 @@ public enum CreatureType {
public String getName() {
return name;
}
public Class<? extends Entity> getEntityClass() {
return clazz;
}

View File

@@ -4,5 +4,5 @@ package org.bukkit.entity;
* Represents an Ender Dragon
*/
public interface EnderDragon extends ComplexLivingEntity {
}

View File

@@ -4,5 +4,5 @@ package org.bukkit.entity;
* Represents an Ender Pearl entity
*/
public interface EnderPearl extends Projectile {
}

View File

@@ -4,5 +4,5 @@ package org.bukkit.entity;
* Represents an Ender Signal, which is often created upon throwing an ender eye
*/
public interface EnderSignal extends Entity {
}

View File

@@ -122,6 +122,7 @@ public interface Entity {
/**
* Returns true if this entity has been marked for removal.
*
* @return True if it is dead.
*/
public boolean isDead();
@@ -165,49 +166,53 @@ public interface Entity {
/**
* Returns the distance this entity has fallen
*
* @return The distance.
*/
public float getFallDistance();
/**
* Sets the fall distance for this entity
*
* @param distance The new distance.
*/
public void setFallDistance(float distance);
/**
* Record the last {@link EntityDamageEvent} inflicted on this entity
*
* @param event a {@link EntityDamageEvent}
*/
public void setLastDamageCause(EntityDamageEvent event);
/**
* Retrieve the last {@link EntityDamageEvent} inflicted on this entity. This event may have been cancelled.
*
* @return the last known {@link EntityDamageEvent} or null if hitherto unharmed
*/
public EntityDamageEvent getLastDamageCause();
/**
* Returns a unique and persistent id for this entity
*
* @return unique id
*/
public UUID getUniqueId();
/**
* Gets the amount of ticks this entity has lived for.
* <p>
* This is the equivalent to "age" in entities.
*
*
* @return Age of entity
*/
public int getTicksLived();
/**
* Sets the amount of ticks this entity has lived for.
* <p>
* This is the equivalent to "age" in entities. May not be
* less than one tick.
*
* This is the equivalent to "age" in entities. May not be less than one tick.
*
* @param value Age of entity
*/
public void setTicksLived(int value);

View File

@@ -10,10 +10,10 @@ public interface ExperienceOrb extends Entity {
* @return Amount of experience
*/
public int getExperience();
/**
* Sets how much experience is contained within this orb
*
*
* @param value Amount of experience
*/
public void setExperience(int value);

View File

@@ -6,24 +6,28 @@ package org.bukkit.entity;
public interface Explosive extends Entity {
/**
* Set the radius affected by this explosive's explosion
*
* @param yield The explosive yield
*/
public void setYield(float yield);
/**
* Return the radius or yield of this explosive's explosion
*
* @return the radius of blocks affected
*/
public float getYield();
/**
* Set whether or not this explosive's explosion causes fire
*
* @param isIncendiary Whether it should cause fire
*/
public void setIsIncendiary(boolean isIncendiary);
/**
* Return whether or not this explosive creates a fire when exploding
*
* @return true if the explosive creates fire, false otherwise
*/
public boolean isIncendiary();

View File

@@ -39,14 +39,6 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible {
*/
public void setItemInHand(ItemStack item);
/**
* Changes the item in hand to another of your 'action slots'.
*
* @param index The new index to use, only valid ones are 0-8.
*
public void selectItemInHand(int index);
*/
/**
* Returns whether this player is slumbering.
*

View File

@@ -25,10 +25,10 @@ public interface LivingEntity extends Entity {
* @throws IllegalArgumentException Thrown if the health is < 0 or > max
*/
public void setHealth(int health);
/**
* Gets the maximum health this entity may have
*
*
* @return Maximum health
*/
public int getMaxHealth();
@@ -86,12 +86,14 @@ public interface LivingEntity extends Entity {
/**
* Throws an egg from the entity.
*
* @return The egg thrown.
*/
public Egg throwEgg();
/**
* Throws a snowball from the entity.
*
* @return The snowball thrown.
*/
public Snowball throwSnowball();

View File

@@ -23,7 +23,7 @@ public interface Minecart extends Vehicle {
/**
* Gets the maximum speed of a minecart. The speed is unrelated to the velocity.
*
*
* @return The max speed
*/
public double getMaxSpeed();
@@ -69,6 +69,7 @@ public interface Minecart extends Vehicle {
* Gets the derailed velocity modifier. Used for minecarts that are on the ground, but not on rails.
*
* A derailed minecart's velocity is multiplied by this factor each tick.
*
* @return derailed visible speed
*/
public Vector getDerailedVelocityMod();

View File

@@ -4,5 +4,5 @@ package org.bukkit.entity;
* Represents a mushroom {@link Cow}
*/
public interface MushroomCow extends Cow {
}

View File

@@ -4,5 +4,5 @@ package org.bukkit.entity;
* Represents a non-player character
*/
public interface NPC extends Creature {
}

View File

@@ -10,12 +10,14 @@ import org.bukkit.material.Attachable;
public interface Painting extends Entity, Attachable {
/**
* Get the art on this painting
*
* @return The art
*/
public Art getArt();
/**
* Set the art on this painting
*
* @param art The new art
* @return False if the new art won't fit at the painting's current location
*/
@@ -23,10 +25,11 @@ public interface Painting extends Entity, Attachable {
/**
* Set the art on this painting
*
* @param art The new art
* @param force If true, force the new art regardless of whether it fits at the current location
* Note that forcing it where it can't fit normally causes it to drop as an item unless you override
* this by catching the PAINTING_BREAK event.
* Note that forcing it where it can't fit normally causes it to drop as an item unless you override
* this by catching the PAINTING_BREAK event.
* @return False if force was false and the new art won't fit at the painting's current location
*/
public boolean setArt(Art art, boolean force);
@@ -34,6 +37,7 @@ public interface Painting extends Entity, Attachable {
/**
* Sets the direction of the painting, potentially overriding rules of placement. Note that if the result
* is not valid the painting would normally drop as an item.
*
* @param face The new direction.
* @param force Whether to force it.
* @return False if force was false and there was no block for it to attach to in order to face the given direction.

View File

@@ -6,7 +6,7 @@ package org.bukkit.entity;
public interface Pig extends Animals, Vehicle {
/**
* Check if the pig has a saddle.
* Check if the pig has a saddle.
*
* @return if the pig has been saddled.
*/

View File

@@ -37,7 +37,7 @@ public interface Player extends HumanEntity, CommandSender, OfflinePlayer {
* @param name The new display name.
*/
public void setDisplayName(String name);
/**
* Gets the name that is shown on the player list.
*
@@ -82,6 +82,7 @@ public interface Player extends HumanEntity, CommandSender, OfflinePlayer {
/**
* Gets the socket address of this player
*
* @return the player's address
*/
public InetSocketAddress getAddress();
@@ -117,12 +118,14 @@ public interface Player extends HumanEntity, CommandSender, OfflinePlayer {
/**
* Returns if the player is in sneak mode
*
* @return true if player is in sneak mode
*/
public boolean isSneaking();
/**
* Sets the sneak mode the player
*
* @param sneak true if player should appear sneaking
*/
public void setSneaking(boolean sneak);
@@ -214,7 +217,7 @@ public interface Player extends HumanEntity, CommandSender, OfflinePlayer {
/**
* Send a chunk change. This fakes a chunk change packet for a user at
* a certain location. The updated cuboid must be entirely within a single
* chunk. This will not actually change the world in any way.
* chunk. This will not actually change the world in any way.
*
* At least one of the dimensions of the cuboid must be even. The size of the
* data buffer must be 2.5*sx*sy*sz and formatted in accordance with the Packet51

View File

@@ -4,5 +4,5 @@ package org.bukkit.entity;
* Represents a small {@link Fireball}
*/
public interface SmallFireball extends Fireball {
}

View File

@@ -4,5 +4,5 @@ package org.bukkit.entity;
* Represents a snowman entity
*/
public interface Snowman extends Creature {
}

View File

@@ -6,12 +6,14 @@ package org.bukkit.entity;
public interface TNTPrimed extends Explosive {
/**
* Set the number of ticks until the TNT blows up after being primed.
*
* @param fuseTicks The fuse ticks
*/
public void setFuseTicks(int fuseTicks);
/**
* Retrieve the number of ticks until the explosion of this TNTPrimed entity
*
* @return the number of ticks until this TNTPrimed explodes
*/
public int getFuseTicks();

View File

@@ -4,5 +4,5 @@ package org.bukkit.entity;
* Represents a thrown potion bottle
*/
public interface ThrownPotion extends Projectile {
}

View File

@@ -4,5 +4,5 @@ package org.bukkit.entity;
* Represents a villager NPC
*/
public interface Villager extends NPC {
}