Fix bug where all ranks less than 10 show as 0 with /mctop.

This commit is contained in:
GJ 2013-06-13 10:56:46 -04:00
parent 050be563bf
commit 8d0601babc

View File

@ -35,7 +35,7 @@ public class MctopCommandDisplayTask extends BukkitRunnable {
int place = (page * 10) - 9;
for (PlayerStat stat : userStats) {
String digit = (place < 10) ? "0" : "" + String.valueOf(place);
String digit = ((place < 10) ? "0" : "") + String.valueOf(place);
// Format: 1. Playername - skill value
sender.sendMessage(digit + ". " + ChatColor.GREEN + stat.name + " - " + ChatColor.WHITE + stat.statVal);