### robocode

# Class RobotDeathEvent

- `java.lang.Object`
- - `robocode.Event`
  - - `robocode.RobotDeathEvent`

Implemented Interfaces:
  Comparable, Serializable

`public final class RobotDeathEvent`
`extends Event`

This event is sent to `onRobotDeath()` when another robot (not your robot) dies.

Author:
  Mathew A. Nelson (original)

  ## Constructor Summary

  `RobotDeathEvent(String robotName)`
    Called by the game to create a new RobotDeathEvent.

  ## Method Summary

  `@Deprecated`

  `String getRobotName()`
    Deprecated. Use `getName()` instead.

  `String`

  `getName()`
    Returns the name of the robot that died.

  ### Methods inherited from class robocode.Event

  `compareTo`, `getPriority`, `getTime`

## Constructor Details

### RobotDeathEvent

    public RobotDeathEvent(String robotName)

> Called by the game to create a new RobotDeathEvent.
> Parameters:
>   `robotName` - the name of the robot that died

## Method Details

### String getRobotName

    public @Deprecated String getRobotName()

> Deprecated. Use `getName()` instead.

> Returns:
>   the name of the robot that died

### getName

    public String getName()

> Returns the name of the robot that died.
> Returns:
>   the name of the robot that died