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

@@ -23,12 +23,14 @@ public interface Block {
/**
* @deprecated use {@link #getRelative(BlockFace face)}
*/
@Deprecated Block getFace(BlockFace face);
@Deprecated
Block getFace(BlockFace face);
/**
* @deprecated use {@link #getRelative(BlockFace face, int distance)}
*/
@Deprecated Block getFace(BlockFace face, int distance);
@Deprecated
Block getFace(BlockFace face, int distance);
/**
* Gets the block at the given offsets
@@ -56,8 +58,9 @@ public interface Block {
* <br />
* For example, the following method places water at 100,102,100; two blocks
* above 100,100,100.
*
* <pre>
* Block block = world.getBlockAt(100,100,100);
* Block block = world.getBlockAt(100, 100, 100);
* Block shower = block.getFace(BlockFace.UP, 2);
* shower.setType(Material.WATER);
* </pre>
@@ -164,12 +167,14 @@ public interface Block {
* Gets the face relation of this block compared to the given block<br />
* <br />
* For example:
*
* <pre>
* Block current = world.getBlockAt(100, 100, 100);
* Block target = world.getBlockAt(100, 101, 100);
*
* current.getFace(target) == BlockFace.Up;
* </pre>
*
* <br />
* If the given block is not connected to this block, null may be returned
*

View File

@@ -42,6 +42,7 @@ public enum BlockFace {
/**
* Get the amount of X-coordinates to modify to get the represented block
*
* @return Amount of X-coordinates to modify
*/
public int getModX() {
@@ -50,6 +51,7 @@ public enum BlockFace {
/**
* Get the amount of Y-coordinates to modify to get the represented block
*
* @return Amount of Y-coordinates to modify
*/
public int getModY() {
@@ -58,6 +60,7 @@ public enum BlockFace {
/**
* Get the amount of Z-coordinates to modify to get the represented block
*
* @return Amount of Z-coordinates to modify
*/
public int getModZ() {

View File

@@ -8,24 +8,28 @@ import org.bukkit.Material;
public interface Jukebox extends BlockState {
/**
* Get the record currently playing
*
* @return The record Material, or AIR if none is playing
*/
public Material getPlaying();
/**
* Set the record currently playing
*
* @param record The record Material, or null/AIR to stop playing
*/
public void setPlaying(Material record);
/**
* Check if the jukebox is currently playing a record
*
* @return True if there is a record playing
*/
public boolean isPlaying();
/**
* Stop the jukebox playing and eject the current record
*
* @return True if a record was ejected; false if there was none playing
*/
public boolean eject();

View File

@@ -47,7 +47,7 @@ public interface NoteBlock extends BlockState {
/**
* Plays an arbitrary note with an arbitrary instrument
*
*
* @param instrument Instrument ID
* @param note Note ID
* @return true if successful, otherwise false
@@ -56,7 +56,7 @@ public interface NoteBlock extends BlockState {
/**
* Plays an arbitrary note with an arbitrary instrument
*
*
* @param instrument The instrument
* @param note The note
* @return true if successful, otherwise false

View File

@@ -11,7 +11,7 @@ public enum PistonMoveReaction {
private int id;
private static Map<Integer, PistonMoveReaction> byId = new HashMap<Integer, PistonMoveReaction>();
static {
for (PistonMoveReaction reaction: PistonMoveReaction.values()) {
for (PistonMoveReaction reaction : PistonMoveReaction.values()) {
byId.put(reaction.id, reaction);
}
}