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

@@ -12,6 +12,7 @@ public class FurnaceRecipe implements Recipe {
/**
* Create a furnace recipe to craft the specified ItemStack.
*
* @param result The item you want the recipe to create.
* @param source The input material.
*/
@@ -24,6 +25,7 @@ public class FurnaceRecipe implements Recipe {
/**
* Create a furnace recipe to craft the specified ItemStack.
*
* @param result The item you want the recipe to create.
* @param source The input material.
*/
@@ -34,6 +36,7 @@ public class FurnaceRecipe implements Recipe {
/**
* Sets the input of this furnace recipe.
*
* @param input The input material.
* @return The changed recipe, so you can chain calls.
*/
@@ -44,6 +47,7 @@ public class FurnaceRecipe implements Recipe {
/**
* Sets the input of this furnace recipe.
*
* @param input The input material.
* @return The changed recipe, so you can chain calls.
*/
@@ -57,6 +61,7 @@ public class FurnaceRecipe implements Recipe {
/**
* Get the input material.
*
* @return The input material.
*/
public MaterialData getInput() {
@@ -65,6 +70,7 @@ public class FurnaceRecipe implements Recipe {
/**
* Get the result of this recipe.
*
* @return The resulting stack.
*/
public ItemStack getResult() {

View File

@@ -349,16 +349,16 @@ public class ItemStack implements ConfigurationSerializable {
}
public static ItemStack deserialize(Map<String, Object> args) {
Material type = Material.getMaterial((String)args.get("type"));
Material type = Material.getMaterial((String) args.get("type"));
short damage = 0;
int amount = 1;
if (args.containsKey("damage")) {
damage = (Short)args.get("damage");
damage = (Short) args.get("damage");
}
if (args.containsKey("amount")) {
amount = (Integer)args.get("amount");
amount = (Integer) args.get("amount");
}
ItemStack result = new ItemStack(type, amount, damage);
@@ -367,13 +367,14 @@ public class ItemStack implements ConfigurationSerializable {
Object raw = args.get("enchantments");
if (raw instanceof Map) {
Map<Object, Object> map = (Map<Object, Object>)raw;
@SuppressWarnings("unchecked")
Map<Object, Object> map = (Map<Object, Object>) raw;
for (Map.Entry<Object, Object> entry : map.entrySet()) {
Enchantment enchantment = Enchantment.getByName(entry.getKey().toString());
if ((enchantment != null) && (entry.getValue() instanceof Integer)) {
result.addEnchantment(enchantment, (Integer)entry.getValue());
result.addEnchantment(enchantment, (Integer) entry.getValue());
}
}
}

View File

@@ -43,7 +43,7 @@ public interface PlayerInventory extends Inventory {
/**
* Put the given ItemStacks into the armor slots
*
* @param items The ItemStacks to use as armour
* @param items The ItemStacks to use as armour
*/
public void setArmorContents(ItemStack[] items);

View File

@@ -7,6 +7,7 @@ public interface Recipe {
/**
* Get the result of this recipe.
*
* @return The result stack
*/
ItemStack getResult();

View File

@@ -16,6 +16,7 @@ public class ShapedRecipe implements Recipe {
/**
* Create a shaped recipe to craft the specified ItemStack. The constructor merely determines the
* result and type; to set the actual recipe, you'll need to call the appropriate methods.
*
* @param result The item you want the recipe to create.
* @see ShapedRecipe#shape(String...)
* @see ShapedRecipe#setIngredient(char, Material)
@@ -29,6 +30,7 @@ public class ShapedRecipe implements Recipe {
/**
* Set the shape of this recipe to the specified rows. Each character represents a different
* ingredient; exactly what each character represents is set separately.
*
* @param shape The rows of the recipe (up to 3 rows).
* @return The changed recipe, so you can chain calls.
*/
@@ -57,6 +59,7 @@ public class ShapedRecipe implements Recipe {
/**
* Sets the material that a character in the recipe shape refers to.
*
* @param key The character that represents the ingredient in the shape.
* @param ingredient The ingredient.
* @return The changed recipe, so you can chain calls.
@@ -71,6 +74,7 @@ public class ShapedRecipe implements Recipe {
/**
* Sets the material that a character in the recipe shape refers to.
*
* @param key The character that represents the ingredient in the shape.
* @param ingredient The ingredient.
* @return The changed recipe, so you can chain calls.
@@ -81,6 +85,7 @@ public class ShapedRecipe implements Recipe {
/**
* Sets the material that a character in the recipe shape refers to.
*
* @param key The character that represents the ingredient in the shape.
* @param ingredient The ingredient.
* @param raw The raw material data as an integer.
@@ -108,6 +113,7 @@ public class ShapedRecipe implements Recipe {
/**
* Get the ingredients map.
*
* @return The mapping of character to ingredients.
*/
public HashMap<Character, MaterialData> getIngredientMap() {
@@ -116,6 +122,7 @@ public class ShapedRecipe implements Recipe {
/**
* Get the shape.
*
* @return The recipe's shape.
*/
public String[] getShape() {
@@ -124,6 +131,7 @@ public class ShapedRecipe implements Recipe {
/**
* Get the result.
*
* @return The result stack.
*/
public ItemStack getResult() {

View File

@@ -16,6 +16,7 @@ public class ShapelessRecipe implements Recipe {
/**
* Create a shapeless recipe to craft the specified ItemStack. The constructor merely determines the
* result and type; to set the actual recipe, you'll need to call the appropriate methods.
*
* @param result The item you want the recipe to create.
* @see ShapelessRecipe#addIngredient(Material)
* @see ShapelessRecipe#addIngredient(MaterialData)
@@ -26,6 +27,7 @@ public class ShapelessRecipe implements Recipe {
/**
* Adds the specified ingredient.
*
* @param ingredient The ingredient to add.
* @return The changed recipe, so you can chain calls.
*/
@@ -35,6 +37,7 @@ public class ShapelessRecipe implements Recipe {
/**
* Adds the specified ingredient.
*
* @param ingredient The ingredient to add.
* @return The changed recipe, so you can chain calls.
*/
@@ -44,6 +47,7 @@ public class ShapelessRecipe implements Recipe {
/**
* Adds the specified ingredient.
*
* @param ingredient The ingredient to add.
* @param rawdata The data value.
* @return The changed recipe, so you can chain calls.
@@ -54,6 +58,7 @@ public class ShapelessRecipe implements Recipe {
/**
* Adds multiples of the specified ingredient.
*
* @param count How many to add (can't be more than 9!)
* @param ingredient The ingredient to add.
* @return The changed recipe, so you can chain calls.
@@ -70,6 +75,7 @@ public class ShapelessRecipe implements Recipe {
/**
* Adds multiples of the specified ingredient.
*
* @param count How many to add (can't be more than 9!)
* @param ingredient The ingredient to add.
* @return The changed recipe, so you can chain calls.
@@ -80,6 +86,7 @@ public class ShapelessRecipe implements Recipe {
/**
* Adds multiples of the specified ingredient.
*
* @param count How many to add (can't be more than 9!)
* @param ingredient The ingredient to add.
* @param rawdata The data value.
@@ -97,6 +104,7 @@ public class ShapelessRecipe implements Recipe {
/**
* Removes an ingredient from the list. If the ingredient occurs multiple times,
* only one instance of it is removed.
*
* @param ingredient The ingredient to remove
* @return The changed recipe.
*/
@@ -107,6 +115,7 @@ public class ShapelessRecipe implements Recipe {
/**
* Get the result of this recipe.
*
* @return The result stack.
*/
public ItemStack getResult() {
@@ -115,6 +124,7 @@ public class ShapelessRecipe implements Recipe {
/**
* Get the list of ingredients used for this recipe.
*
* @return The input list
*/
public ArrayList<MaterialData> getIngredientList() {