From 0e34202d4d9f417bca4e2a7fc786276c6a10d2eb Mon Sep 17 00:00:00 2001 From: Jamie Sinn Date: Sun, 20 Dec 2015 23:05:48 -0500 Subject: [PATCH] Curly braces as toothpick requested @andrewkm --- .../commands/MctopCommandDisplayTask.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java index cf3547cf2..f1c9ffc7a 100644 --- a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java @@ -51,16 +51,20 @@ public class MctopCommandDisplayTask extends BukkitRunnable { private void displayChat() { if (skill == null) { - if(sender instanceof Player) + if(sender instanceof Player) { sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Leaderboard")); - else + } + else { sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.PowerLevel.Leaderboard"))); + } } else { - if(sender instanceof Player) + if(sender instanceof Player) { sender.sendMessage(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName())); - else + } + else { sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName()))); + } } int place = (page * 10) - 9; @@ -69,11 +73,13 @@ public class MctopCommandDisplayTask extends BukkitRunnable { // Format: // 01. Playername - skill value // 12. Playername - skill value - if(sender instanceof Player) + if(sender instanceof Player) { sender.sendMessage(String.format("%2d. %s%s - %s%s", place, ChatColor.GREEN, stat.name, ChatColor.WHITE, stat.statVal)); - else + } + else { sender.sendMessage(String.format("%2d. %s - %s", place, stat.name, stat.statVal)); - + } + place++; } }