MatchPlayerState

public final class MatchPlayerState

Owns the write-ahead lease for every player state that EternalTD temporarily replaces during a match.

The lease is written into playerdata and flushed before the first match mutation. A hard JVM exit can therefore persist either the untouched player or the temporary match state, but both carry enough information to restore the player on the next join. Normal teardown and crash recovery deliberately use the same idempotent path.

Types

Link copied to clipboard
public enum RestoreResult

Functions

Link copied to clipboard
public static void enter(Player player, Location matchSpawn)
Atomically enters EternalTD ownership: durably lease the original state, then teleport and apply the temporary match inventory/flight state.
Link copied to clipboard
public static boolean hasRecoveryLease(Player player)
Link copied to clipboard
public static void recoverOnlinePlayers()
Restores players who joined while EternalTD was still initializing.
Link copied to clipboard
Production recovery boundary.
Link copied to clipboard
public static MatchPlayerState.RestoreResult restoreIfOwned(Player player)
Restores a state owned by EternalTD.