From 3a9c55a9eabb386813ac60d5d387095450f59e4e Mon Sep 17 00:00:00 2001 From: JamieSinn Date: Sat, 12 Dec 2015 00:04:23 -0500 Subject: [PATCH] Remove ternary operators and use if/else --- .../runnables/commands/MctopCommandDisplayTask.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 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 3f8d1cc10..cf3547cf2 100644 --- a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java @@ -69,8 +69,11 @@ public class MctopCommandDisplayTask extends BukkitRunnable { // Format: // 01. Playername - skill value // 12. Playername - skill value - sender.sendMessage(String.format("%2d. %s%s - %s%s", place, sender instanceof Player ? ChatColor.GREEN : "", - stat.name, sender instanceof Player ? ChatColor.WHITE : "", stat.statVal)); + if(sender instanceof Player) + sender.sendMessage(String.format("%2d. %s%s - %s%s", place, ChatColor.GREEN, stat.name, ChatColor.WHITE, stat.statVal)); + else + sender.sendMessage(String.format("%2d. %s - %s", place, stat.name, stat.statVal)); + place++; } }