MessageEvent (Robocode 1.2.4-Beta API)

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## robocode
Class MessageEvent

    java.lang.Object
      robocode.Event
          robocode.MessageEvent

All Implemented Interfaces:
  java.lang.Comparable<Event>

    public class MessageEvent

extends Event

A MessageEvent is sent to `TeamRobot.onMessageReceived(robocode.MessageEvent)` when a teammate sends you a message. You can use the information contained in this event to determine what to do.

Author:
  Mathew A. Nelson (original)

Constructor Summary
`MessageEvent(java.lang.String sender, java.io.Serializable message)` Called by the game to create a new MessageEvent.

Method Summary
`java.io.Serializable` | `getMessage()` Returns the message itself.
`java.lang.String` | `getSender()` Returns the name of the sending robot

Methods inherited from class robocode.Event
`compareTo, getPriority, getTime, setPriority, setTime`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MessageEvent

    public MessageEvent(java.lang.String sender,
                        java.io.Serializable message)

  Called by the game to create a new MessageEvent.

Method Detail

### getSender

    public java.lang.String getSender()

  Returns the name of the sending robot

  Returns:
    the name of the sending robot

### getMessage

    public java.io.Serializable getMessage()

  Returns the message itself.

  Returns:
    the message

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD