From ac485382018e5d0b8720db6e8205bba29069f38f Mon Sep 17 00:00:00 2001 From: mbax Date: Thu, 15 Nov 2012 15:49:50 -0500 Subject: [PATCH] Handle 0 online in list command. Fixes #32 --- src/main/java/net/md_5/bungee/command/CommandList.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/net/md_5/bungee/command/CommandList.java b/src/main/java/net/md_5/bungee/command/CommandList.java index dc26dd28..c570357a 100644 --- a/src/main/java/net/md_5/bungee/command/CommandList.java +++ b/src/main/java/net/md_5/bungee/command/CommandList.java @@ -17,6 +17,11 @@ public class CommandList extends Command StringBuilder users = new StringBuilder(); Collection connections = BungeeCord.instance.connections.values(); + if (connections.size() == 0) { + sender.sendMessage(ChatColor.BLUE + "Currently no players online."); + return; + } + for (UserConnection con : connections) { switch (getPermission(con))