/src/packets/PlayerQuitCmd.java

http://inequity.googlecode.com/ · Java · 32 lines · 21 code · 4 blank · 7 comment · 0 complexity · b4e2ee48e9fc9527ac349993d825e822 MD5 · raw file

  1. package packets;
  2. import elements.Consts.Priorities;
  3. import network.ClientController;
  4. /**
  5. *
  6. * @author Joel Garboden
  7. */
  8. public class PlayerQuitCmd extends Command
  9. {
  10. /**
  11. *
  12. */
  13. public PlayerQuitCmd()
  14. {
  15. this.priority = Priorities.TURN_UPDATE;
  16. }
  17. @Override
  18. public boolean execCommand(ClientController controller)
  19. {
  20. controller.disconnect();
  21. return true;
  22. }
  23. @Override
  24. public String toString()
  25. {
  26. return "playerQuitCmd";
  27. }
  28. }