package ua.nanit.limbo.server.commands; import ua.nanit.limbo.server.Command; import ua.nanit.limbo.server.LimboServer; import ua.nanit.limbo.server.Logger; import java.util.Map; public class CmdHelp implements Command { private final LimboServer server; public CmdHelp(LimboServer server) { this.server = server; } @Override public void execute() { Map commands = server.getCommandManager().getCommands(); Logger.info("Available commands:"); for (Map.Entry entry : commands.entrySet()) { Logger.info("%s - %s", entry.getKey(), entry.getValue().description()); } } @Override public String description() { return "Show this message"; } }