Package de.creepsmash.common.messages.server

Examples of de.creepsmash.common.messages.server.KickPlayerResponseMessage


    String playerName = m.getPlayerName();
    Client client = sender.getClient();
    PlayerInGame kicked = getGame().getClients().get(playerName);
    if (kicked == null) {
      logger.warn("cannot find player '" + playerName + "'");
      client.send(new KickPlayerResponseMessage(ResponseType.failed));
      return this;
    } else {
      Client kickedClient = kicked.getClient();
      logger.info("kicking " + kickedClient + " from game '" + getGame() + "'");
      client.send(new KickPlayerResponseMessage(ResponseType.ok));
      kickedClient.send(new KickedMessage());
      return removeClient(kickedClient, "kicked");
    }
  }
View Full Code Here


      messageObject = new UpgradeTowerRoundMessage();
    } else if (KickedMessage.PATTERN.matcher(messageString).matches()) {
      messageObject = new KickedMessage();
    } else if (KickPlayerResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new KickPlayerResponseMessage();
    } else if (PingMessage.PATTERN.matcher(messageString).matches()) {
      messageObject = new PingMessage();
    } else if (UpdateDataResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new UpdateDataResponseMessage();
View Full Code Here

            JOptionPane.ERROR_MESSAGE);
      }
    }
   
    if (m instanceof KickPlayerResponseMessage) {
      KickPlayerResponseMessage kprm = (KickPlayerResponseMessage) m;
      if (kprm.getResponseType().equals(IConstants.ResponseType.ok)) {
        DefaultListModel dl =
          (DefaultListModel) this.playerlist.getModel();
       
        removePlayer((String) this.playerlist.getSelectedValue());
        dl.removeElement(this.playerlist.getSelectedValue());
View Full Code Here

TOP

Related Classes of de.creepsmash.common.messages.server.KickPlayerResponseMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.