mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Remove ternary operators and use if/else
This commit is contained in:
parent
2dd1775d9a
commit
3a9c55a9ea
@ -69,8 +69,11 @@ public class MctopCommandDisplayTask extends BukkitRunnable {
|
|||||||
// Format:
|
// Format:
|
||||||
// 01. Playername - skill value
|
// 01. Playername - skill value
|
||||||
// 12. Playername - skill value
|
// 12. Playername - skill value
|
||||||
sender.sendMessage(String.format("%2d. %s%s - %s%s", place, sender instanceof Player ? ChatColor.GREEN : "",
|
if(sender instanceof Player)
|
||||||
stat.name, sender instanceof Player ? ChatColor.WHITE : "", stat.statVal));
|
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++;
|
place++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user