Package net.lightstone.msg

Examples of net.lightstone.msg.ChatMessage


  }

  @Override
  public ChatMessage decode(ChannelBuffer buffer) {
    String message = ChannelBufferUtils.readString(buffer);
    return new ChatMessage(message);
  }
View Full Code Here


  /**
   * Broadcasts a message to every player.
   * @param text The message text.
   */
  public void broadcastMessage(String text) {
    ChatMessage message = new ChatMessage(text);
    for (Player player : getPlayers())
      player.getSession().send(message);
  }
View Full Code Here

  /**
   * A convenience method for sending a message to this player.
   * @param message The message.
   */
  public void sendMessage(String message) {
    session.send(new ChatMessage(message));
  }
View Full Code Here

TOP

Related Classes of net.lightstone.msg.ChatMessage

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.