From 333f38fb64f75f3d9d37a80f11a4ee423937b6f9 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sat, 9 Apr 2022 00:09:54 -0500 Subject: [PATCH] Don't send empty line for list if there are no players --- src/main/java/dev/plex/command/impl/ListCMD.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/dev/plex/command/impl/ListCMD.java b/src/main/java/dev/plex/command/impl/ListCMD.java index 0ca1355..b22eb67 100644 --- a/src/main/java/dev/plex/command/impl/ListCMD.java +++ b/src/main/java/dev/plex/command/impl/ListCMD.java @@ -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);