Class PlayerEliminateEvent<P>

java.lang.Object
net.blueva.arcade.api.events.GameEvent
net.blueva.arcade.api.events.PlayerEliminateEvent<P>
Type Parameters:
P - the player type (platform-specific)

public class PlayerEliminateEvent<P> extends GameEvent
Event fired when a player is eliminated from the game.

This event is triggered when a player's state changes to ELIMINATED. The reason for elimination can vary depending on the game (e.g., death, timeout, rule violation). Game modules can listen to this event to perform custom actions when players are eliminated.

  • Constructor Details

    • PlayerEliminateEvent

      public PlayerEliminateEvent(int arenaId, String gameId, P player, String reason)
      Constructs a new PlayerEliminateEvent.
      Parameters:
      arenaId - the ID of the arena where the elimination occurred
      gameId - the unique identifier of the game module
      player - the player who was eliminated
      reason - the reason for the elimination (game-specific)
  • Method Details

    • getPlayer

      public P getPlayer()
      Gets the player who was eliminated.
      Returns:
      the eliminated player
    • getReason

      public String getReason()
      Gets the reason why the player was eliminated.
      Returns:
      a description of why the player was eliminated