From 72ea0a12209b3d16dd9373d8164e770dd4a3ecb5 Mon Sep 17 00:00:00 2001 From: snowleo Date: Mon, 4 Apr 2011 17:58:02 +0000 Subject: [PATCH] [trunk] Unlimited: Fix for list git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1125 e251c2fe-e539-e718-e476-b85c1f46cddb --- .../earth2me/essentials/commands/Commandunlimited.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java b/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java index 8026b9d60..1441590c9 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java @@ -4,6 +4,7 @@ import com.earth2me.essentials.Essentials; import com.earth2me.essentials.InventoryWorkaround; import com.earth2me.essentials.ItemDb; import com.earth2me.essentials.User; +import java.util.List; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.Server; @@ -36,11 +37,15 @@ public class Commandunlimited extends EssentialsCommand StringBuilder sb = new StringBuilder(); sb.append("Unlimited items: "); boolean first = true; - for (Integer integer : target.getUnlimited()) { + List items = target.getUnlimited(); + if (items.isEmpty()) { + sb.append("none"); + } + for (Integer integer : items) { if (!first) { sb.append(", "); - first = false; } + first = false; String matname = Material.getMaterial(integer).toString().toLowerCase().replace("_", ""); sb.append(matname); }