diff options
author | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-04 17:58:02 +0000 |
---|---|---|
committer | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-04 17:58:02 +0000 |
commit | 6be3f1913dac6752be1daac650b9eeb87901b820 (patch) | |
tree | ac2fed7655aa1d229296ab15c6f612c952d9100b | |
parent | ce357dfb10d0fc87e58b6e2ccea7609c2b429229 (diff) | |
download | Essentials-6be3f1913dac6752be1daac650b9eeb87901b820.tar Essentials-6be3f1913dac6752be1daac650b9eeb87901b820.tar.gz Essentials-6be3f1913dac6752be1daac650b9eeb87901b820.tar.lz Essentials-6be3f1913dac6752be1daac650b9eeb87901b820.tar.xz Essentials-6be3f1913dac6752be1daac650b9eeb87901b820.zip |
[trunk] Unlimited: Fix for list
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1125 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandunlimited.java | 9 |
1 files 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<Integer> 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); } |