Improving your recording
Our first integration records a whole world and keeps one active recording. Let’s adapt the same start/stop flow for a real arena game. We will add one concept at a time: capture bounds, participants, and multiple matches. The save-result handling from the first tutorial still applies.Give the recording an arena
If several arenas share one Bukkit world, recording the world alone is too broad. Create a bounding box:max + 1 on each axis.
Now pass the bounds when starting:
Choose the participants
We also want spectators outside our participant set to stay out of player capture. Use the overload that accepts player UUIDs:
Null participants means all in-scope players. An empty set means no players, not “use defaults.” Nonplayer entities are still selected spatially.
The session snapshots this selection immutably; bounds and participants are not persisted as replay metadata. Selection describes the player being captured, not the holder of a network channel: a spectator’s outgoing packets may still describe selected players or relevant world events. See capture routing before adding packet-level filtering.
Make participants owners, when that is your policy
Being recorded does not automatically grant catalog access. If every match participant should be an owner, supply their UUIDs as the owner list too:Validate player-supplied text
When names/descriptions come from users, validate them before starting:Allow several matches
The first example’sactiveSession field is our own one-match simplification, not a recorder limit. Reverse can record independent sessions in the same world.
Keep each recording ID in its match object. At match end, stop the stored ID:

