summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCeltic Minstrel <celtic.minstrel.ca@some.place>2012-03-17 10:28:20 -0400
committerEvilSeph <evilseph@gmail.com>2012-03-20 20:43:12 -0400
commit288662bfaefaa715cf34932b4ceb3ab4c8e5b310 (patch)
treec5a5f4fa8a8a50968b35d9ae24222f2cf6c58e39
parentb9a71db046cc11d4678cc9e5f8a4654658e86cfa (diff)
downloadcraftbukkit-288662bfaefaa715cf34932b4ceb3ab4c8e5b310.tar
craftbukkit-288662bfaefaa715cf34932b4ceb3ab4c8e5b310.tar.gz
craftbukkit-288662bfaefaa715cf34932b4ceb3ab4c8e5b310.tar.lz
craftbukkit-288662bfaefaa715cf34932b4ceb3ab4c8e5b310.tar.xz
craftbukkit-288662bfaefaa715cf34932b4ceb3ab4c8e5b310.zip
[Bleeding] Fix some return types that could lead to ArrayStoreException
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java6
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java
index 6e20363c..0a64d772 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java
@@ -41,8 +41,8 @@ public class CraftInventoryCrafting extends CraftInventory implements CraftingIn
}
@Override
- public CraftItemStack[] getContents() {
- CraftItemStack[] items = new CraftItemStack[getSize()];
+ public ItemStack[] getContents() {
+ ItemStack[] items = new ItemStack[getSize()];
net.minecraft.server.ItemStack[] mcResultItems = getResultInventory().getContents();
int i = 0;
@@ -85,7 +85,7 @@ public class CraftInventoryCrafting extends CraftInventory implements CraftingIn
}
public ItemStack[] getMatrix() {
- CraftItemStack[] items = new CraftItemStack[getSize()];
+ ItemStack[] items = new ItemStack[getSize()];
net.minecraft.server.ItemStack[] matrix = getMatrixInventory().getContents();
for (int i = 0; i < matrix.length; i++ ) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
index 21867fcf..8ff94dff 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
@@ -64,9 +64,9 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i
setItem(getSize() + 0, boots);
}
- public CraftItemStack[] getArmorContents() {
+ public ItemStack[] getArmorContents() {
net.minecraft.server.ItemStack[] mcItems = getInventory().getArmorContents();
- CraftItemStack[] ret = new CraftItemStack[mcItems.length];
+ ItemStack[] ret = new ItemStack[mcItems.length];
for (int i = 0; i < mcItems.length; i++) {
ret[i] = new CraftItemStack(mcItems[i]);