By: Taylor Kelly <tkelly910@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2011-01-10 09:57:47 +08:00
parent 76cc515db3
commit cc7e6db997
2 changed files with 6 additions and 5 deletions

View file

@ -67,4 +67,4 @@
</plugin>
</plugins>
</build>
</project>
</project>

View file

@ -1,5 +1,6 @@
package org.bukkit.craftbukkit;
import java.util.ArrayList;
import net.minecraft.server.InventoryPlayer;
import org.bukkit.ItemStack;
@ -14,15 +15,15 @@ public class CraftInventoryPlayer extends CraftInventory implements PlayerInvent
return (InventoryPlayer) inventory;
}
public CraftItemStack[] getArmorContents() {
public ArrayList<ItemStack> getArmorContents() {
net.minecraft.server.ItemStack[] mcItems = getInventory().getArmorContents();
CraftItemStack[] items = new CraftItemStack[mcItems.length];
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
for (int i = 0; i < mcItems.length; i++ ) {
items[i] = new CraftItemStack(mcItems[i]);
ret.add(new CraftItemStack(mcItems[i]));
}
return items;
return ret;
}
public int getSize() {