From cc7e6db9974829b366f9ab485e1a411738892c88 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 10 Jan 2011 09:57:47 +0800 Subject: [PATCH] - By: Taylor Kelly --- paper-server/pom.xml | 2 +- .../org/bukkit/craftbukkit/CraftInventoryPlayer.java | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/paper-server/pom.xml b/paper-server/pom.xml index aa623a25b..229ed354f 100644 --- a/paper-server/pom.xml +++ b/paper-server/pom.xml @@ -67,4 +67,4 @@ - + \ No newline at end of file diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftInventoryPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftInventoryPlayer.java index 576661e2f..b49d6d971 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftInventoryPlayer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftInventoryPlayer.java @@ -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 getArmorContents() { net.minecraft.server.ItemStack[] mcItems = getInventory().getArmorContents(); - CraftItemStack[] items = new CraftItemStack[mcItems.length]; + ArrayList ret = new ArrayList(); 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() {