summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorEdmond Poon <sagaciouszzzz@gmail.com>2013-03-20 00:42:05 -0400
committerEdmond Poon <sagaciouszzzz@gmail.com>2013-03-20 00:42:05 -0400
commitf8353cf49802f0408ed2250c362401258a6c31d4 (patch)
tree261371fb86d19a914c8a5cdc5cc21c48021aee39 /src/main
parent862c421230f251b2b029d259630d1608caf54257 (diff)
downloadbukkit-f8353cf49802f0408ed2250c362401258a6c31d4.tar
bukkit-f8353cf49802f0408ed2250c362401258a6c31d4.tar.gz
bukkit-f8353cf49802f0408ed2250c362401258a6c31d4.tar.lz
bukkit-f8353cf49802f0408ed2250c362401258a6c31d4.tar.xz
bukkit-f8353cf49802f0408ed2250c362401258a6c31d4.zip
Pulling all pending Bukkit-JavaDoc changes
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/block/Skull.java2
-rw-r--r--src/main/java/org/bukkit/event/entity/EntityDamageEvent.java8
-rw-r--r--src/main/java/org/bukkit/inventory/Inventory.java25
-rw-r--r--src/main/java/org/bukkit/material/MaterialData.java2
4 files changed, 22 insertions, 15 deletions
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<ItemStack> {
* <p />
* 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.
+ * <p />
+ * 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<ItemStack> {
* <p />
* 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<ItemStack> {
public boolean contains(ItemStack item, int amount);
/**
- * Returns a HashMap with all slots and ItemStacks in the inventory with
- * given materialId.
- * <p />
- * 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<ItemStack> {
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.
+ * <p />
+ * 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) {