Skip to content

Commit

Permalink
Generic cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
grum committed Jan 15, 2012
1 parent 78cc950 commit eb9dc64
Show file tree
Hide file tree
Showing 61 changed files with 248 additions and 275 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/bukkit/Achievement.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private Achievement(int id) {

/**
* Gets the ID for this achievement.
*
* <p />
* Note that this is offset using {@link #STATISTIC_OFFSET}
*
* @return ID of this achievement
Expand All @@ -48,7 +48,7 @@ public int getId() {

/**
* Gets the achievement associated with the given ID.
*
* <p />
* Note that the ID must already be offset using {@link #STATISTIC_OFFSET}
*
* @param id ID of the achievement to return
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bukkit/Bukkit.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static Server getServer() {

/**
* Attempts to set the {@link Server} singleton.
*
* <p />
* This cannot be done if the Server is already set.
*
* @param server Server instance
Expand Down
93 changes: 46 additions & 47 deletions src/main/java/org/bukkit/EntityEffect.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,50 @@
* A list of all Effects that can happen to entities.
*/
public enum EntityEffect {

/**
* When mobs get hurt.
*/
HURT((byte) 2),

/**
* When a mob dies.
* <p>
* <b>This will cause client-glitches!
*/
DEATH((byte) 3),

/**
* The smoke when taming a wolf fails.
* <p>
* Without client-mods this will be ignored if the entity is not a wolf.
*/
WOLF_SMOKE((byte) 6),

/**
* The hearts when taming a wolf succeeds.
* <p>
* Without client-mods this will be ignored if the entity is not a wolf.
*/
WOLF_HEARTS((byte) 7),

/**
* When a wolf shakes (after being wet).
* <p>
* Without client-mods this will be ignored if the entity is not a wolf.
*/
WOLF_SHAKE((byte) 8);

private final byte data;

EntityEffect(byte data)
{
this.data = data;
}

/**
* @return The data-value that is sent to the client to play this effect.
*/
public byte getData() {
return data;
}

/**
* When mobs get hurt.
*/
HURT((byte) 2),

/**
* When a mob dies.
* <p>
* <b>This will cause client-glitches!
*/
DEATH((byte) 3),

/**
* The smoke when taming a wolf fails.
* <p>
* Without client-mods this will be ignored if the entity is not a wolf.
*/
WOLF_SMOKE((byte) 6),

/**
* The hearts when taming a wolf succeeds.
* <p>
* Without client-mods this will be ignored if the entity is not a wolf.
*/
WOLF_HEARTS((byte) 7),

/**
* When a wolf shakes (after being wet).
* <p>
* Without client-mods this will be ignored if the entity is not a wolf.
*/
WOLF_SHAKE((byte) 8);

private final byte data;

EntityEffect(byte data) {
this.data = data;
}

/**
* @return The data-value that is sent to the client to play this effect.
*/
public byte getData() {
return data;
}
}
1 change: 0 additions & 1 deletion src/main/java/org/bukkit/Material.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/org/bukkit/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
public interface Server extends PluginMessageRecipient {
/**
* Used for all administrative messages, such as an operator using a command.
*
* <p />
* For use in {@link #broadcast(java.lang.String, java.lang.String)}
*/
public static final String BROADCAST_CHANNEL_ADMINISTRATIVE = "bukkit.broadcast.admin";

/**
* Used for all announcement messages, such as informing users that a player has joined.
*
* <p />
* For use in {@link #broadcast(java.lang.String, java.lang.String)}
*/
public static final String BROADCAST_CHANNEL_USERS = "bukkit.broadcast.user";
Expand Down Expand Up @@ -155,7 +155,7 @@ public interface Server extends PluginMessageRecipient {

/**
* Broadcast a message to all players.
*
* <p />
* This is the same as calling {@link #broadcast(java.lang.String, java.lang.String)} to {@link #BROADCAST_CHANNEL_USERS}
*
* @param message the message
Expand All @@ -166,7 +166,7 @@ public interface Server extends PluginMessageRecipient {
/**
* Gets the name of the update folder. The update folder is used to safely update
* plugins at the right moment on a plugin load.
*
* <p />
* The update folder name is relative to the plugins folder.
*
* @return The name of the update folder
Expand All @@ -183,7 +183,7 @@ public interface Server extends PluginMessageRecipient {

/**
* Gets a player object by the given username
*
* <p />
* This method may not return objects for offline players
*
* @param name Name to look up
Expand All @@ -202,7 +202,7 @@ public interface Server extends PluginMessageRecipient {
/**
* Attempts to match any players with the given name, and returns a list
* of all possibly matches
*
* <p />
* This list is not sorted in any particular order. If an exact match is found,
* the returned list will only contain a single result.
*
Expand Down Expand Up @@ -457,7 +457,7 @@ public interface Server extends PluginMessageRecipient {

/**
* Gets the player by the given name, regardless if they are offline or online.
*
* <p />
* This will return an object even if the player does not exist. To this method, all players will exist.
*
* @param name Name of the player to retrieve
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bukkit/Statistic.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public int getId() {

/**
* Checks if this is a substatistic.
*
* <p />
* A substatistic exists in mass for each block or item, depending on {@link #isBlock()}
*
* @return true if this is a substatistic
Expand Down
31 changes: 13 additions & 18 deletions src/main/java/org/bukkit/World.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public interface World extends PluginMessageRecipient {
*
* @param x X-coordinate of the block
* @param z Z-coordinate of the block
*
* @return Highest non-empty block
*/
public Block getHighestBlockAt(int x, int z);
Expand All @@ -91,7 +90,6 @@ public interface World extends PluginMessageRecipient {
* Gets the highest non-empty block at the given coordinates
*
* @param location Coordinates to get the highest block
*
* @return Highest non-empty block
*/
public Block getHighestBlockAt(Location location);
Expand Down Expand Up @@ -154,7 +152,7 @@ public interface World extends PluginMessageRecipient {

/**
* Loads the {@link Chunk} at the specified coordinates
*
* <p />
* If the chunk does not exist, it will be generated.
* This method is analogous to {@link #loadChunk(int, int, boolean)} where generate is true.
*
Expand All @@ -175,7 +173,7 @@ public interface World extends PluginMessageRecipient {

/**
* Safely unloads and saves the {@link Chunk} at the specified coordinates
*
* <p />
* This method is analogous to {@link #unloadChunk(int, int, boolean, boolean)} where safe and saveis true
*
* @param chunk the chunk to unload
Expand All @@ -185,7 +183,7 @@ public interface World extends PluginMessageRecipient {

/**
* Safely unloads and saves the {@link Chunk} at the specified coordinates
*
* <p />
* This method is analogous to {@link #unloadChunk(int, int, boolean, boolean)} where safe and saveis true
*
* @param x X-coordinate of the chunk
Expand All @@ -196,7 +194,7 @@ public interface World extends PluginMessageRecipient {

/**
* Safely unloads and optionally saves the {@link Chunk} at the specified coordinates
*
* <p />
* This method is analogous to {@link #unloadChunk(int, int, boolean, boolean)} where save is true
*
* @param x X-coordinate of the chunk
Expand All @@ -219,7 +217,7 @@ public interface World extends PluginMessageRecipient {

/**
* Safely queues the {@link Chunk} at the specified coordinates for unloading
*
* <p />
* This method is analogous to {@link #unloadChunkRequest(int, int, boolean)} where safe is true
*
* @param x X-coordinate of the chunk
Expand Down Expand Up @@ -366,7 +364,7 @@ public interface World extends PluginMessageRecipient {

/**
* Gets a semi-unique identifier for this world.
*
* <p />
* While it is highly unlikely that this may be shared with another World,
* it is not guaranteed to be unique
*
Expand Down Expand Up @@ -395,7 +393,7 @@ public interface World extends PluginMessageRecipient {

/**
* Gets the relative in-game time of this world.
*
* <p />
* The relative time is analogous to hours * 1000
*
* @return The current relative time
Expand All @@ -405,7 +403,7 @@ public interface World extends PluginMessageRecipient {

/**
* Sets the relative in-game time on the server.
*
* <p />
* The relative time is analogous to hours * 1000
* <br /><br />
* Note that setting the relative time below the current relative time will
Expand Down Expand Up @@ -650,43 +648,40 @@ public interface World extends PluginMessageRecipient {

/**
* Gets the biome for the given block coordinates.
*
* <p />
* It is safe to run this method when the block does not exist, it will not create the block.
*
* @param x X coordinate of the block
* @param z Z coordinate of the block
*
* @return Biome of the requested block
*/
public Biome getBiome(int x, int z);

/**
* Gets the temperature for the given block coordinates.
*
* <p />
* It is safe to run this method when the block does not exist, it will not create the block.
*
* @param x X coordinate of the block
* @param z Z coordinate of the block
*
* @return Temperature of the requested block
*/
public double getTemperature(int x, int z);

/**
* Gets the humidity for the given block coordinates.
*
* <p />
* It is safe to run this method when the block does not exist, it will not create the block.
*
* @param x X coordinate of the block
* @param z Z coordinate of the block
*
* @return Humidity of the requested block
*/
public double getHumidity(int x, int z);

/**
* Gets the maximum height of this world.
*
* <p />
* If the max height is 100, there are only blocks from y=0 to y=99.
*
* @return Maximum height of the world
Expand All @@ -695,7 +690,7 @@ public interface World extends PluginMessageRecipient {

/**
* Gets the sea level for this world.
*
* <p />
* This is often half of {@link #getMaxHeight()}
*
* @return Sea level
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/bukkit/block/Block.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public interface Block {
/**
* Captures the current state of this block. You may then cast that state
* into any accepted type, such as Furnace or Sign.
*
* <p />
* The returned object will never be updated, and you are not guaranteed that
* (for example) a sign is still a sign after you capture its state.
*
Expand Down Expand Up @@ -248,7 +248,7 @@ public interface Block {

/**
* Checks if this block is empty.
*
* <p />
* A block is considered empty when {@link #getType()} returns {@link Material#AIR}.
*
* @return true if this block is empty
Expand All @@ -257,7 +257,7 @@ public interface Block {

/**
* Checks if this block is liquid.
*
* <p />
* A block is considered liquid when {@link #getType()} returns {@link Material#WATER}, {@link Material#STATIONARY_WATER}, {@link Material#LAVA} or {@link Material#STATIONARY_LAVA}.
*
* @return true if this block is liquid
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bukkit/block/BlockState.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* Represents a captured state of a block, which will not change automatically.
*
* <p />
* Unlike Block, which only one object can exist per coordinate, BlockState can
* exist multiple times for any given Block. Note that another plugin may change
* the state of the block and you will not know, or they may change the block to
Expand Down
Loading

0 comments on commit eb9dc64

Please sign in to comment.