Enum PlayerState

java.lang.Object
java.lang.Enum<PlayerState>
net.blueva.arcade.api.player.PlayerState
All Implemented Interfaces:
Serializable, Comparable<PlayerState>

public enum PlayerState extends Enum<PlayerState>
Represents the different states a player can be in during a game.

Players typically start as PLAYING and may transition to ELIMINATED or SPECTATOR based on game events and rules.

  • Enum Constant Details

    • PLAYING

      public static final PlayerState PLAYING
      The player is actively participating in the game. This is the default state for players who are alive and competing.
    • SPECTATOR

      public static final PlayerState SPECTATOR
      The player is spectating the game. Spectators can watch the game but cannot interact with gameplay elements. This state is typically used for players who join after the game has started.
    • ELIMINATED

      public static final PlayerState ELIMINATED
      The player has been eliminated from the game. Eliminated players can no longer participate but may still be in the arena as spectators depending on the game configuration.
  • Method Details

    • values

      public static PlayerState[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PlayerState valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null