mirror of
https://github.com/Nan1t/NanoLimbo.git
synced 2025-07-13 13:10:13 +02:00
33 lines
776 B
Java
33 lines
776 B
Java
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<String, Command> commands = server.getCommandManager().getCommands();
|
|
|
|
Logger.info("Available commands:");
|
|
|
|
for (Map.Entry<String, Command> entry : commands.entrySet()) {
|
|
Logger.info("%s - %s", entry.getKey(), entry.getValue().description());
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public String description() {
|
|
return "Show this message";
|
|
}
|
|
}
|