mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 09:37:50 +01:00
[trunk] Unlimited: Fix for list
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1125 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
b19fa531cf
commit
72ea0a1220
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user