From c97111ca5888180cb102d8a86c6967acb4221cfb Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 9 Jan 2011 23:40:29 +0100 Subject: [PATCH] Fixed getArmorContents() return value By: Erik Broes --- paper-api/src/main/java/org/bukkit/ItemStack.java | 5 +++++ paper-api/src/main/java/org/bukkit/PlayerInventory.java | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/ItemStack.java b/paper-api/src/main/java/org/bukkit/ItemStack.java index e90a5fe5d9..b2a4c6f4bb 100644 --- a/paper-api/src/main/java/org/bukkit/ItemStack.java +++ b/paper-api/src/main/java/org/bukkit/ItemStack.java @@ -126,6 +126,11 @@ public class ItemStack { return -1; } + @Override + public String toString() { + return "ItemStack{"+getType().name()+" x "+getAmount()+"}"; + } + @Override public boolean equals(Object object) { return false; diff --git a/paper-api/src/main/java/org/bukkit/PlayerInventory.java b/paper-api/src/main/java/org/bukkit/PlayerInventory.java index 419eb07bcd..9dfffc6d68 100644 --- a/paper-api/src/main/java/org/bukkit/PlayerInventory.java +++ b/paper-api/src/main/java/org/bukkit/PlayerInventory.java @@ -1,7 +1,5 @@ package org.bukkit; -import java.util.ArrayList; - /** * Includes interface to the 4 armor slots */ @@ -11,7 +9,7 @@ public interface PlayerInventory extends Inventory { * * @return All the ItemStacks from the armor slots */ - public ArrayList getArmorContents(); + public ItemStack[] getArmorContents(); /** * Return the ItemStack from the helmet slot