### robocode.robotinterfaces

# Interface ITeamEvents

Known Implementing Classes:
  TeamRobot

`public interface ITeamEvents`

An event interface for receiving robot team events with an `ITeamRobot`.

Authors:
  Pavel Savara (original)
  Flemming N. Larsen (javadoc)

Since:
  1.6

See Also:
  `ITeamRobot`

  ## Method Summary

  `void`

  `onMessageReceived(MessageEvent event)`
    This method is called when your robot receives a message from a teammate.

## Method Details

### onMessageReceived

    public void onMessageReceived(MessageEvent event)

> This method is called when your robot receives a message from a teammate. You should override it in your robot if you want to be informed of this event.

> Example:

>        public void onMessageReceived(MessageEvent event) {
>            out.println(event.getSender() + " sent me: " + event.getMessage());
>        }

> Parameters:
>   `event` - the message event sent by the game
> See Also:
>   `MessageEvent`, `Event`