    001    package net.minecraft.command;
    002
    003    import net.minecraft.server.MinecraftServer;
    004
    005    public class CommandServerList extends CommandBase
    006    {
    007        public String getCommandName()
    008        {
    009            return "list";
    010        }
    011
    012        /**
    013         * Return the required permission level for this command.
    014         */
    015        public int getRequiredPermissionLevel()
    016        {
    017            return 0;
    018        }
    019
    020        public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)
    021        {
    022            par1ICommandSender.sendChatToPlayer(par1ICommandSender.translateString("commands.players.list", new Object[] {Integer.valueOf(MinecraftServer.getServer().getCurrentPlayerCount()), Integer.valueOf(MinecraftServer.getServer().getMaxPlayers())}));
    023            par1ICommandSender.sendChatToPlayer(MinecraftServer.getServer().getConfigurationManager().getPlayerListAsString());
    024        }
    025    }