Skip to content
Björn Teichmann edited this page Dec 19, 2013 · 2 revisions

Realms is a multi-server feature first introduced in the v8.0 betas. It has the following features:

  • Integrates with the Inquisitor plugin to share data between servers.
  • A server belongs to a realm and shares player data with other servers in the same realm.
  • When a player quits and disconnects from a server in a realm and re-joins another server in the same realm, they are immediately reconnected to the server they quit from.
  • When a player dies and respawns, they are reconnected to their "bed" server or sent to a "respawn" gate.
  • When a new player joins a server in a realm, they can optionally be reconnected to a different, default server or gate.

Configuration

Realm support requires installation and use of the Inquisitor plugin. So first, download, install, and get that plugin working on every server in the same realm. Configure the Inquisitor plugin on each server to use the SAME DATABASE and make sure the database option "shared" is true (the default). Then come back here.

There is only one option in Transporter that must be set before realm support is functional. Use the following command to set the name of the realm your server belongs to:

trp realm set name "My Realm"

Pick any realm name you'd like. Just make sure it matches EXACTLY on every server in the same realm. To be sure, once realm support is fully enabled (the next step), look at the output of the trp server list command; you should see a line that shows the "remote realm" received from the connected server and a message right after it that says "realm-mate".

Now, you can enable realm support using the trp realm enable command. A message will be displayed on the console if realm support is successfully enabled or if there's a problem.

Other Requirements

Realm support works hand-in-hand with other features of the Transporter plugin, namely, configured servers. When Transporter connects to another server, it receives the remote server's name as defined in the remote server's "server.properties" file. This name must match exactly the name of the server Transporter intends to send a player to based on the data received from the Inquisitor plugin (i.e., the name stored in the database). Since Transporter can connect to multiple servers simultaneously, it's possible more than one remote server will have the same name. This WILL cause problems. Each realm server's configured name (from the server.properties file) must be unique within the realm.

Features

Player Join

When a player joins a server in a realm for the first time, they can optionally be sent to a configured default server or gate. If neither of these is configured on the server the player connects to, they remain on that server. If they aren't sent to another server, either because they are already on the default server or there is no default server configured, they can optionally be sent to a default world.

When a player joins a server in a realm but they've already played on any server in the realm, they are immediately sent back to the server they last played on. That server will normally then place the player in the last world and location they were in. See Other Requirements above for information if this isn't working for you.

If Transporter decides it needs to send the player to a different server but that server can't be found or is offline, the "restoreWhenServerOffline" option is consulted. If true, the player will remain where they are, but all their inventory, armor, and basic stats will be restored from the data received from Inquisitor. The message configured in "restoreWhenServerOfflineFormat" will also be sent to them.

If the "restoreWhenServerOffline" option is false, the "kickWhenServerOffline" option is consulted. If true, the player is immediately kicked with the message from the "kickWhenServerOfflineFormat" option.

If the "kickWhenServerOffline" option is false, the player is left where they are and sent the message from the "serverOfflineFormat" option.

Player Respawn

When a player dies, they will respawn at the bed they last slept in, even if the bed is on another server (their "realm home"). You can optionally configure a gate to send them to instead.

If the the server specified by the player's realm home is not found or is offline, the "kickWhenServerOffline" option is consulted. If true, the player is immediately kicked with the message from the "kickWhenServerOfflineFormat" option.

If the "kickWhenServerOffline" option is false, the player will respawn where ever the server decides and will be sent the message from the "serverOfflineFormat" option.

Options

These options exist in the "realm" section of the configuration file and can be configured with the trp realm set ... command.

Option Type Default Version Description
defaultGate string none v8.4 The name of the gate to send players to when they connect to the realm for the first time. This overrides the defaultServer and defaultWorld options.
defaultServer string none v8.0 The name of the server to send players to when they connect to the realm for the first time.
defaultWorld string none v8.0 The name of the world to send players to when they connect to the realm for the first time.
kickWhenServerOffline boolean true v8.1 Determines if a joining or respawning player will be kicked if they cannot be sent to another server.
kickWhenServerOfflineFormat string Server '%server%' is offline. v8.1 The kick message to send a player when they are kicked because they cannot be sent to a remote server. The "%server%" token will be replaced by the name of the server they were supposed to be sent to.
name string none v8.0 The name of the realm this server belongs to.
respawnGate string none v8.4 The name of the gate to send players to when the respawn. If not set, a respawning player will be sent to their "realm home".
restoreWhenServerOffline boolean true v8.1 Determines if a joining player will have their inventory and stats restored if they cannot be sent to another server.
restoreWhenServerOfflineFormat string You're not where you belong because server '%server%' is offline. v8.1 The message to send a player when they are being restored because they cannot be sent to a remote server. The "%server%" token will be replaced by the name of the server they were supposed to be sent to.
serverOfflineFormat string You're not where you belong because server '%server%' is offline. v8.1 The message to send a player when they cannot be sent to a remote server. The "%server%" token will be replaced by the name of the server they were supposed to be sent to.
Clone this wiki locally