mc_wait_until_in_world
Wait until the player confirms they are in a world after joining, or detect a join failure with reason.
Instructions
Poll until the player is in a world (or the join visibly failed). Checks every second: a game snapshot with a player present means in-world; a DisconnectedScreen means the join failed and its title is returned as the reason; anything else keeps waiting until the timeout.
Use after mc_join_server with wait=false, after a relaunch, or whenever you need to confirm the client finished loading into a world. If you fired the join from INSIDE a world (mc_join_server wait=false), pass requireAbsenceFirst=true: on older bridges the ack comes before the old world tears down, so the first polls can still see its player and report in-world for a join that hasn't happened yet (current bridges ack after teardown — the gate is harmless insurance there). Read-only — doesn't require session control to be enabled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeoutSeconds | No | Give up after this many seconds. Default 60. | |
| requireAbsenceFirst | No | Only count a player snapshot as in-world after the old session visibly dropped (one successful snapshot without a player). Use when a join was issued from inside a world. Default false. |