PlayerCustody

public interface PlayerCustody

Whether the core takes over a player's inventory and state for the match.

Functions

Link copied to clipboard
public abstract void capture(Player player)
Takes custody before the match changes anything.
Link copied to clipboard
public static PlayerCustody none()
The match leaves inventories alone.
Link copied to clipboard
public abstract void recover(Player player)
Join-time recovery after a crash: restores and moves the player back.
Link copied to clipboard
public abstract void restore(Player player)
Restores the captured state without moving the player.
Link copied to clipboard
public static PlayerCustody snapshot(NamespacedKey key)
Crash-safe custody under key: the original inventory, held slot, flight and return location are flushed to playerdata before the match changes anything, restored on leave, and restored on the next join after a crash.