From f8353cf49802f0408ed2250c362401258a6c31d4 Mon Sep 17 00:00:00 2001 From: Edmond Poon Date: Wed, 20 Mar 2013 00:42:05 -0400 Subject: Pulling all pending Bukkit-JavaDoc changes --- src/main/java/org/bukkit/block/Skull.java | 2 +- .../org/bukkit/event/entity/EntityDamageEvent.java | 8 +++---- src/main/java/org/bukkit/inventory/Inventory.java | 25 ++++++++++++++-------- .../java/org/bukkit/material/MaterialData.java | 2 +- 4 files changed, 22 insertions(+), 15 deletions(-) (limited to 'src/main') diff --git a/src/main/java/org/bukkit/block/Skull.java b/src/main/java/org/bukkit/block/Skull.java index 44c4aa64..35c07bb6 100644 --- a/src/main/java/org/bukkit/block/Skull.java +++ b/src/main/java/org/bukkit/block/Skull.java @@ -17,7 +17,7 @@ public interface Skull extends BlockState { /** * Gets the owner of the skull * - * @return the owner if the skull + * @return the owner of the skull */ public String getOwner(); diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java index c2b48624..dcd4e1ad 100644 --- a/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java @@ -28,18 +28,18 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable { } /** - * Gets the amount of damage caused by the Block + * Gets the amount of damage caused by the event * - * @return The amount of damage caused by the Block + * @return The amount of damage caused by the event */ public int getDamage() { return damage; } /** - * Sets the amount of damage caused by the Block + * Sets the amount of damage caused by the event * - * @param damage The amount of damage caused by the Block + * @param damage The amount of damage caused by the event */ public void setDamage(int damage) { this.damage = damage; diff --git a/src/main/java/org/bukkit/inventory/Inventory.java b/src/main/java/org/bukkit/inventory/Inventory.java index 0f7fab92..46b981be 100644 --- a/src/main/java/org/bukkit/inventory/Inventory.java +++ b/src/main/java/org/bukkit/inventory/Inventory.java @@ -71,8 +71,15 @@ public interface Inventory extends Iterable { *

* The returned HashMap contains what it couldn't store, where the key is the * index of the parameter, and the value is the ItemStack at that index - * of the variadic parameter. If all items are stored, it will return an + * of the varargs parameter. If all items are stored, it will return an * empty HashMap. + *

+ * If you pass in ItemStacks which exceed the maximum stack size for the + * Material, first they will be added to partial stacks where + * Material.getMaxStackSize() is not exceeded, up to + * Material.getMaxStackSize(). When there are no partial stacks left + * stacks will be split on Inventory.getMaxStackSize() allowing you to + * exceed the maximum stack size for that material. * * @param items The ItemStacks to add * @return A HashMap containing items that didn't fit. @@ -88,7 +95,7 @@ public interface Inventory extends Iterable { *

* The returned HashMap contains what it couldn't remove, where the key is the * index of the parameter, and the value is the ItemStack at that index of the - * variadic parameter. If all the given ItemStacks are removed, it will return + * varargs parameter. If all the given ItemStacks are removed, it will return * an empty HashMap. * * @param items The ItemStacks to remove @@ -169,12 +176,7 @@ public interface Inventory extends Iterable { public boolean contains(ItemStack item, int amount); /** - * Returns a HashMap with all slots and ItemStacks in the inventory with - * given materialId. - *

- * The HashMap contains entries where, the key is the slot index, and the - * value is the ItemStack in that slot. If no matching ItemStack with the - * given materialId is found, an empty map is returned. + * Checks if the inventory contains any ItemStacks matching the given ItemStack and at least the minimum amount specified * * @param item The ItemStack to match against * @param amount The minimum amount @@ -183,7 +185,12 @@ public interface Inventory extends Iterable { public boolean containsAtLeast(ItemStack item, int amount); /** - * Find all slots in the inventory containing any ItemStacks with the given materialId. + * Returns a HashMap with all slots and ItemStacks in the inventory with + * given materialId. + *

+ * The HashMap contains entries where, the key is the slot index, and the + * value is the ItemStack in that slot. If no matching ItemStack with the + * given materialId is found, an empty map is returned. * * @param materialId The materialId to look for * @return A HashMap containing the slot index, ItemStack pairs diff --git a/src/main/java/org/bukkit/material/MaterialData.java b/src/main/java/org/bukkit/material/MaterialData.java index 9e28fcf6..adb78195 100644 --- a/src/main/java/org/bukkit/material/MaterialData.java +++ b/src/main/java/org/bukkit/material/MaterialData.java @@ -75,7 +75,7 @@ public class MaterialData implements Cloneable { /** * Creates a new ItemStack based on this MaterialData * - * @param amount The stack size of the new stak + * @param amount The stack size of the new stack * @return New ItemStack containing a copy of this MaterialData */ public ItemStack toItemStack(int amount) { -- cgit v1.2.3