Lobby
The lobby is the reference for proxy bundles. Velocity stands in front of two Paper servers, lobby and arena. Every player can type /lobby, and a player kicked from a game lands back in the lobby with a message that says why.
Source: examples/lobby.
What it shows
Section titled “What it shows”- Rules for the proxy.
proxy/Lobby.tsimports no Java. TheLobbycomponent has three messages (AskedForLobby,Kicked,Connected) and two Commands (Connect,Tell). - The proxy half.
proxy/velocity.tsdefault-exportsVelocity.make(...)from@minekube/velocity. It registers/lobbywithVelocity.command, turns Velocity’s kick event into a message, and implementsConnectwith a connection request whose result is theConnectedmessage. - Servers by selector. In the dev network, Velocity finds
lobbyandarenaby label selectors (stage=lobby,game=arena), through the registry. See Labels and selectors. - A swap on the proxy.
lobby.e2e.tsswaps the proxy bundle for a new revision while the client stays connected, then a backend kicks the player. - Every client version.
matrix.e2e.tsjoins with the official client of each protocol version Velocity lists. Each one must land in the lobby, get/lobby’s answer and survive a kick, on one connection.
Run it
Section titled “Run it”From the repository:
mk server --networkmk dev examples/lobbyJoin localhost. bun test examples/lobby runs the rules and replays recordings/. bun run test:e2e and bun run test:matrix run the end-to-end tests. They need the dev network and Java 25, and the matrix downloads a few GB of clients on its first run.
Read next
Section titled “Read next”- Proxy bundles: how a proxy bundle is written.
- Run the dev network: what
mk server --networkstarts.
Was this helpful?
Thanks for the feedback.