Klasse ArenaPlayer

java.lang.Object
de.delinkedde.mobarenareborn.session.ArenaPlayer

public final class ArenaPlayer extends Object
Per-player state within an ArenaSession.

Holds the player's identity, their pre-join PlayerStash and their ready flag. The live Player object is intentionally not retained; callers resolve it from the unique id when needed so the session never holds a stale reference across a reconnect.

  • Konstruktordetails

    • ArenaPlayer

      public ArenaPlayer(@NotNull @NotNull Player player, @NotNull @NotNull PlayerStash stash)
      Captures a joining player's identity and pre-join state.
      Parameter:
      player - the joining player
      stash - the snapshot of the player's state taken before joining
  • Methodendetails

    • uniqueId

      @NotNull public @NotNull UUID uniqueId()
      Gibt zurück:
      the player's unique id
    • name

      @NotNull public @NotNull String name()
      Gibt zurück:
      the player's name as captured on join
    • stash

      @NotNull public @NotNull PlayerStash stash()
      Gibt zurück:
      the snapshot to restore when the player leaves
    • isReady

      public boolean isReady()
      Gibt zurück:
      whether the player has readied up
    • setReady

      public void setReady(boolean ready)
      Sets the ready flag.
      Parameter:
      ready - the new value
    • isEliminated

      public boolean isEliminated()
      Gibt zurück:
      whether the player has been eliminated (is spectating) this round
    • setEliminated

      public void setEliminated(boolean eliminated)
      Sets the eliminated flag.
      Parameter:
      eliminated - the new value
    • chosenClass

      @Nullable public @Nullable String chosenClass()
      Gibt zurück:
      the chosen class identifier, or null if none selected yet
    • setChosenClass

      public void setChosenClass(@NotNull @NotNull String chosenClass)
      Sets the chosen class.
      Parameter:
      chosenClass - the class identifier