mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-23 01:27:37 +00:00
Don't send empty line for list if there are no players
This commit is contained in:
parent
d55eaf0d3d
commit
333f38fb64
@ -37,6 +37,10 @@ public class ListCMD extends PlexCommand
|
|||||||
.append(Component.space())
|
.append(Component.space())
|
||||||
.append(Component.text(Bukkit.getMaxPlayers() == 1 ? "player." : "players.").color(NamedTextColor.GRAY));
|
.append(Component.text(Bukkit.getMaxPlayers() == 1 ? "player." : "players.").color(NamedTextColor.GRAY));
|
||||||
send(sender, header);
|
send(sender, header);
|
||||||
|
if (players.size() == 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
for (int i = 0; i < players.size(); i++)
|
for (int i = 0; i < players.size(); i++)
|
||||||
{
|
{
|
||||||
Player player = players.get(i);
|
Player player = players.get(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user