Klasse ArenaPlayer
java.lang.Object
de.delinkedde.mobarenareborn.session.ArenaPlayer
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.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungArenaPlayer(@NotNull Player player, @NotNull PlayerStash stash) Captures a joining player's identity and pre-join state. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibung@Nullable StringbooleanbooleanisReady()@NotNull Stringname()voidsetChosenClass(@NotNull String chosenClass) Sets the chosen class.voidsetEliminated(boolean eliminated) Sets the eliminated flag.voidsetReady(boolean ready) Sets the ready flag.@NotNull PlayerStashstash()@NotNull UUIDuniqueId()
-
Konstruktordetails
-
ArenaPlayer
Captures a joining player's identity and pre-join state.- Parameter:
player- the joining playerstash- the snapshot of the player's state taken before joining
-
-
Methodendetails
-
uniqueId
- Gibt zurück:
- the player's unique id
-
name
- Gibt zurück:
- the player's name as captured on join
-
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
- Gibt zurück:
- the chosen class identifier, or
nullif none selected yet
-
setChosenClass
Sets the chosen class.- Parameter:
chosenClass- the class identifier
-