Don't send empty line for list if there are no players

This commit is contained in:
Telesphoreo 2022-04-09 00:09:54 -05:00
parent d55eaf0d3d
commit 333f38fb64
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,10 @@ public class ListCMD extends PlexCommand
.append(Component.space())
.append(Component.text(Bukkit.getMaxPlayers() == 1 ? "player." : "players.").color(NamedTextColor.GRAY));
send(sender, header);
if (players.size() == 0)
{
return null;
}
for (int i = 0; i < players.size(); i++)
{
Player player = players.get(i);