Content generated with AI — it may contain mistakes.

ExyliaSandBox/SystemsguideUpdated in v1.2.0

Let players enter: RTP and the queue

The three ways into a sandbox world (/rtp, /rtpqueue, /rtpqueuefast), how the 1v1 matcher pairs players, and how to tune the safe-spot search.

Page 8 of 245 min read

There are three commands into a sandbox world and they all end the same way: the player is claimed, their inventory is saved and cleared, a kit goes on, and a safe spot inside the border is found. This page shows which one to point players at and how to tune it.

Before you start#

At least one world must be ready (see Worlds) and players need a kit (see Kits). For entering without a command, use a teleport pad.

Steps#

Straight in with /rtp

/rtp opens the world list. Each world's stack size is the number of players inside, and only a ready world glows; clicking one that is not ready does nothing. /rtp <world> skips the list and refuses a world that is not ready. A player in combat is refused.

Usable kitsWhat happens
NoneRefused: they are told to make a kit
OneStraight in, wearing it
Two or moreThe kit list opens

Wait for an opponent with /rtpqueue

/rtpqueue opens the same list, but joining puts the player in that world's queue instead of teleporting them. Everybody online sees a message that they joined.

Let the plugin choose with /rtpqueuefast

/rtpqueuefast joins a queue without asking which world. It picks the world holding the player who has waited longest anywhere, so someone is matched at once; failing that, a random ready world.

Leave

/leavertpqueue leaves the queue. /leavesandbox leaves a queue or a sandbox world (see below).

Check that it works#

Run /rtp, pick a world and a kit. You land inside the border, the sandbox sidebar appears and the kit goes on. Then try two players with /rtpqueue in the same world: within a second both are teleported, facing each other.

Going further#

How the queue matches players#

The matcher runs once a second. For each ready world with two or more players waiting, it takes the two who have waited longest and sends them in together: one safe spot is found the ordinary way, a second at exactly rtp.queue-pair-distance blocks from it (10 by default), and both players are turned to face each other. One pair per world is handled at a time, so a queue of six empties in three steps.

A pair that cannot get two safe spots is dropped from the queue and told so; they have to rejoin.

Re-rolling from inside a world#

A player already inside a sandbox world who runs /rtp is moved to a new spot in the world they pick. They keep the kit they wear and are not claimed again. Their old spot becomes the /back point.

Coming back with /back#

/back returns a player to their last saved sandbox spot. That spot is saved when they die, re-roll, teleport to somebody with /tpa, or are sent by a pad from inside a sandbox world. It works once, it is cleared on disconnect, and from the lobby it asks for a kit first. A player in combat is refused.

Leaving#

/leavesandbox covers these cases:

StateWhat happens
In the kit creatorRefused
Combat-taggedRefused
In a queueLeaves the queue
In a sandbox worldBack to the lobby, inventory restored, sidebar hidden

Death and disconnect do the same as the last row. Death is cancelled before vanilla sees it: nothing drops, no experience is lost, there is no respawn screen. Death also saves the /back point, counts the kill and the death, and refreshes the sidebar of everyone left in the world.

Tune it#

Edit config.yml under rtp (or use /sandboxadmin → Settings), then Reload. See Configuration.

KeyDefaultWhat it does
rtp.queue-pair-distance10Blocks between the two players of a queue pair
rtp.search-attempts50Random spots tried before giving up
rtp.border-margin20Blocks kept clear of the world border
rtp.rotative-queue-actionbar-time2.0Seconds each waiting player is advertised for
Technical details
  • Safe-spot search: a random x, z inside the border (minus the margin) is picked, the chunk is loaded asynchronously, and the column must be solid ground that is not lava or water with air above. Out of attempts: the player is told there is no safe location, the claim is released and their inventory restored. A queue pair gets double the attempts for the first spot and triple for the second.
  • Arrival: two ticks after the teleport lands, and only if the player is really in a sandbox world, they are set to survival with no invulnerability or flight, all potion effects are removed, health, food and saturation are full, fall distance is cleared, the sidebar appears and the kit is applied. A teleport that fails releases the claim and restores the inventory.
  • Action bars (messages.yml → queue): in-queue-actionbar is shown to the queued player each second (%world%, %time% waited); rotative-queue-actionbar is shown to everybody not queued who is in a sandbox world or the lobby, one waiting player at a time. Both are effect blocks, so a sound or particle can be added.
  • The claim: every player inside a sandbox or queue holds an ExyliaLib session claim named Sandbox. It stops ExyliaFFA, ExyliaEvents and ExyliaPracticeCore pulling them into something else, and it is what isInSandbox answers from, not the world they stand in.
  • A claim with nothing behind it (not in a world, queue or creator) is released by /leavesandbox and a warning is logged.
  • Events: SandboxJoinEvent (cancellable, for both /rtp and queue joins), SandboxArriveEvent, SandboxLeaveEvent. See API.

Something missing on this page? Tell us on Discord