Skip to content

Search the store

Find products and categories.

Installation

Set up a Duels network: which product goes on which server, the Kernel groups and regions it needs, and the Aegis config for each server.

Network layout

A Duels network has three kinds of Paper server. All of them need Bridge set up first, and all of them must use the same MongoDB and Redis.

ServerProduct in the loaderKernel groupWhat it does
Duels lobbyDuelsLobbyMust end in lobby, for example duels-lobbyQueues, duel requests, parties, kit editor, stats, staff menus.
Game serverDuelsGameAnything else, for example duels-gameHosts matches. Run as many as you need. Also runs matchmaking and builds the vanilla arenas.
Replay serverDuelsGameExactly stasisPlays back replays and community reviews. It does not host matches.

You need at least one lobby and one game server. Add a replay server if you want /replay and /stasis to work.

Scaffold, Bridge, Kernel and Stash are required by both Duels products. The loader adds them for you when your licence includes them. Scaffold is included with Duels. Bridge is sold separately.

Install the loader products

Products are delivered through your personal Aegis loader. If the loader is not on the server yet, follow Installation first.

Add DuelsLobby to the lobby

On the lobby server, add DuelsLobby under products:.

plugins/Aegis/config.yml
products:
  DuelsLobby:
    enabled: true
    release: latest
    channel: stable
    required: true

Add DuelsGame to each game server

On every game server and on the replay server, add DuelsGame instead.

plugins/Aegis/config.yml
products:
  DuelsGame:
    enabled: true
    release: latest
    channel: stable
    required: true

Install packetevents

Put the packetevents plugin in plugins/ on every Duels server. Duels uses it and the loader does not ship it.

Set the Kernel group, region and server id

Each server needs a unique server id and the right group. Lobby and game servers that should work together need the same region. These keys live in Kernel's config.

plugins/Kernel/kernel.yml
serverId: duels-game-1
region: eu
group: duels-game

You can set the same values with the BRIDGE_SERVER, NEXUS_REGION and BRIDGE_GROUP environment variables. When one is set, it wins over the file.

Restart every server

On first start each product creates its files:

  • plugins/DuelsLobby/ and plugins/DuelsGame/ get settings.yml, messages.yml, menus.yml, common-settings.yml, common-messages.yml and common-menus.yml.
  • plugins/Scaffold/ gets scaffold.yml, settings.yml, messages.yml and menus.yml.

How servers find each other

Duels does not need a list of servers. Every server publishes its server id, group, region and online players to Redis twice a second, and the others read that list.

  • Matches stay in the lobby's region. When two players are matched, the match goes to the game server with the fewest players in the region of the server they queued from. If that region has no game server, the players get an error message instead of a match.
  • Matchmaking prefers same-region players. A player is paired with someone from their own region first, and with anyone in range if no one fits.
  • Players go back to a lobby. After a match, players are sent to the lobby with the fewest players. A game server in group name-game prefers lobbies in group name-lobby.

Leave gameServer: true in plugins/Scaffold/scaffold.yml on game and replay servers. It is the default. A game server with gameServer: false does not host matches.

First-time setup

  1. Join the lobby with an account that has duels.admin.
  2. Stand where players should appear and run /duels setspawn. The spawn is shared by every Duels lobby.
  3. Create a kit. See Kits.
  4. Give the kit the VanillaTerrain flag so it has arenas. See Arenas.
  5. Give players duels.ranked if they should play ranked. See Permissions.
  6. Queue the kit with /play on two accounts to check that a match starts.

Check it works

  • Once an enabled kit has the VanillaTerrain flag, a game server logs generating 5 vanilla arena(s). Game servers check 10 seconds after startup and then every 5 minutes while they have no match running.
  • /map list on any Duels server lists the arenas.
  • Queueing two players for the same kit sends both to a game server.