List.java 514 B

123456789101112131415161718192021222324252627282930313233
  1. package command;
  2. import server.Client;
  3. import server.Server;
  4. public class List extends Command {
  5. @Override
  6. public void execute(String[] args, Client caller) {
  7. caller.send("Users online are:" + Server.getUsersOnlineString());
  8. }
  9. @Override
  10. public String setName() {
  11. return "list";
  12. }
  13. @Override
  14. public int setMinArgNumber() {
  15. return 0;
  16. }
  17. @Override
  18. public String writeDescription() {
  19. return "Lists all users online.";
  20. }
  21. @Override
  22. public String setPermission() {
  23. return "noob.list";
  24. }
  25. }