From 4fb7d60eeeae3b63ff154a25f75c2fccc4f9990f Mon Sep 17 00:00:00 2001 From: T00thpick1 Date: Sat, 12 Jan 2013 21:58:02 -0500 Subject: [PATCH] Java loop should work right now, forgot to order it earlier --- .../java/com/gmail/nossr50/commands/mc/MctopCommand.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/commands/mc/MctopCommand.java b/src/main/java/com/gmail/nossr50/commands/mc/MctopCommand.java index 944def973..d8429c0fe 100644 --- a/src/main/java/com/gmail/nossr50/commands/mc/MctopCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/mc/MctopCommand.java @@ -144,9 +144,12 @@ public class MctopCommand implements CommandExecutor { else { sender.sendMessage(LocaleLoader.getString("Commands.Skill.Leaderboard", new Object[] { Misc.getCapitalized(query) })); } - int place = ((page * 10) - 9); - for (ArrayList entry : userslist.values()) { - sender.sendMessage(String.valueOf(place) + ". " + ChatColor.GREEN + entry.get(1) + " - " + ChatColor.WHITE + entry.get(0)); + int place = (page * 10) - 9; + for (int i =0; i < 10; i++) { + if(userslist.get(i) == null) { + break; + } + sender.sendMessage(String.valueOf(place) + ". " + ChatColor.GREEN + userslist.get(i).get(1) + " - " + ChatColor.WHITE + userslist.get(i).get(0)); place++; } }