Network
Challenging players on other servers, server-kit duels on an arena server, what a network needs, and what never crosses servers.
With network.enabled: true players can challenge anyone on the network, and server-kit duels are fought on
one arena server. Both players are sent there, fight, and are sent back to their own server afterwards.
What a network needs
One database
The same database on every server in plugins/ExyliaDuels/database.yml (MySQL, MariaDB, PostgreSQL or
MongoDB), so kits, records and the escrow are shared.
Redis
Redis enabled in that same database.yml on every server, with the same Redis and key-prefix, and a
different server-id on each server. See ExyliaLib's database.
ExyliaProxyUtils
ExyliaProxyUtils on the proxy, with the proxy's server names
equal to the backends' server-ids: that name is where messages and players are sent.
One arena server
The arenas built on it, its server-id written in network.arena-server on every server, and
network.enabled: true there too.
Shared economy, if any
network.shared-economy: true only when every server reads the same balances (a shared ExyliaEconomy,
or a Vault economy on the shared database). Otherwise players on different servers cannot bet money.
How a network duel goes
/duel <player>finds the player wherever they are and tab-completes every name on the network. The request, the answer and its expiry travel between the two servers; the challenged player gets the same clickable block as on one server.- Server-kit duels may span the network. On accept, both players are held where they are, the arena server is told who is coming, and both are sent there. Once both have arrived it reads the kit fresh from the database, holds the money bets, runs the countdown, the kit and the fight, and sends each player back to their own server.
- If somebody does not arrive within 30 seconds, the duel is called off and whoever did arrive is sent back; nothing was taken. A player who still turns up within two minutes after that is sent straight home.
- A held player who is never sent is let go after 30 seconds.
- A server-kit duel between two players on the same server that has no arena for it (no ready arena for that kit, or the chosen arena is not ready here) is also sent to the arena server.
- Kits from other plugins, such as the Random kit, are fought on the arena server too, so that plugin must run there as well (for ExyliaRandomKitsCore, in the same network group and on the same database). Where it does not, the kit is not offered, and a duel naming it is called off with "That kit is not available on this server." before anybody is dressed.
After a network duel
The duel is decided on the arena server and both players are sent home. The end-of-duel summary is kept in
the shared database until after-duel.window closes, so [INVENTORY], [YOURS] and [⟲ REMATCH]
work from any server. A rematch with the opponent on another server travels like any challenge; their
balance is checked when they accept. Each history row names the server that decided the duel.
What never crosses servers
| Term | Across servers |
|---|---|
| Own inventory, keep or risk | No: a player's inventory lives on their server. "Fighting with your own inventory needs both players on the same server." |
| Item bets | No: "Item bets need both players on the same server." |
| Money bets | Only with network.shared-economy: true, and never in a currency of items or experience, which stay on the server the player carries them on. |
| Server kit | Yes. |
When the players are on different servers the challenge screen opens on a server kit and refuses to switch to own inventory or turn on an item bet. The arena picker then lists every enabled arena, since the duel is fought on the arena server.
Spectating
Arenas, spectators and their schematics are local to the server that built them: spectate a network duel from the arena server.
Replays are stored in the shared database, but a replay is watched in its own arena: a server without that arena refuses it, so watch the replays of network duels from the arena server.
Something missing on this page? Tell us on Discord