Content generated with AI — it may contain mistakes.

Systems

RTP and the queue

How a player enters a sandbox world: the safe-location search, the 1v1 matcher, the fast queue and the action bars.

There are three ways into a sandbox world, and they all end the same way: the player is claimed, their inventory is snapshotted and cleared, a kit goes on, and a safe location is found inside the border.

/rtp — straight in

/rtp opens the world list. Each row's stack size is the number of players in that world, and only a READY world glows; clicking one that is not ready does nothing.

/rtp <world> skips the list. It refuses if that world is not READY.

From there:

Usable kitsWhat happens
NoneRefused with queue.no-kit
OneStraight in, wearing it
Two or moreThe kit list opens

A player who is already inside a sandbox world is re-rolled to a new location in the world they picked, keeping the kit they are wearing and without being claimed again. Their old spot becomes the /back point.

A random x, z inside the border is picked, the chunk is loaded asynchronously, and the column is checked: solid ground that is not lava or water, with two air blocks above it. Up to rtp.search-attempts tries — fifty by default — and the search stays rtp.border-margin blocks clear of the border. Running out of attempts refuses with queue.no-safe-location.

/rtpqueue — wait for an opponent

/rtpqueue opens the same world list, but joining puts the player in that world's queue instead of teleporting them. Joining is broadcast to every player online.

The matcher runs once a second. For each world that is READY and has two or more players waiting, it takes the two who have waited longest and sends them in together:

  • one safe location is found the ordinary way;
  • a second is found at exactly rtp.queue-pair-distance blocks from the first — ten by default;
  • both players are turned to face each other, and then both are teleported.

If anything fails at that point, both players are put back as they were.

Only one pair per world is processed at a time, so a queue of six drains in three ticks of the matcher rather than all at once.

/rtpqueuefast — let it pick the world

/rtpqueuefast joins a queue without asking which world. It picks, in order:

  1. the world holding the player who has been waiting longest anywhere — so somebody is matched immediately;
  2. failing that, a random loaded READY world.

From inside a sandbox world it queues with the kit the player is wearing.

/leavertpqueue leaves whichever queue they are in.

The two action bars

Both are config.yml → rtp, and both are ordinary effect blocks, so a sound or a particle can be added to either.

KeyWho sees it
in-queue-actionbarThe queued player, redrawn every second with %world% and %time% — how long they have waited
rotative-queue-actionbarEverybody not queued who is in a sandbox world or in the lobby world, advertising one waiting player at a time

rotative-queue-actionbar-time is how many seconds each waiting player is advertised for before the bar moves to the next one. It is a number of seconds and it takes decimals.

Arriving

Two ticks after the teleport lands, and only if the player really is in a sandbox world:

  • game mode set to survival, invulnerability off, flight off;
  • every potion effect removed;
  • health, food and saturation set to full, fall distance cleared;
  • the playtime session starts, the sidebar appears, the kit is applied.

Leaving

/leavesandbox covers four cases:

StateWhat happens
In the kit creatorRefused
In a queueLeaves the queue
In a sandbox worldTeleported to the lobby, inventory restored, sidebar hidden, session ended, claim released
Holding a claim but neither of the aboveThe claim is released and a warning is logged — this is a leak being cleaned up

Death and a disconnect do the same work as the third row. Death additionally saves the /back point, counts the kill and the death, and refreshes the sidebar of everybody left in the world.

Death is cancelled outright

Inside a sandbox world the death event is cancelled before vanilla sees it. Nothing drops, no experience is lost, there is no respawn screen and no death message unless the world's show_death_messages toggle is on. The player is simply moved to the lobby two ticks later.

The claim

Every player inside a sandbox or in a queue holds an ExyliaLib session claim named Sandbox. That is what stops ExyliaFFA, ExyliaEvents, ExyliaPracticeCore and the rest of the suite from pulling them into something else at the same time, and it is what isInSandbox answers from — not the world they happen to be standing in. For the length of an unfinished teleport the two disagree, and the claim wins.

Something missing on this page? Tell us on Discord