Cross-server
On a network, every server shares one database, so a player's homes are the same everywhere. /home base on the lobby takes them to their base on survival: BerryHomes asks the proxy to move them, and they spawn right on the home when they arrive.
Setup
A shared database. MySQL, MariaDB or MongoDB that every backend can reach. SQLite won't work, because each server would have its own file.
The same
storage:section on every server:storage: type: mysql table-prefix: bh_ mysql: host: 10.0.0.5 port: 3306 database: berryhomes username: berryhomes password: 'secret'A different
server-nameon each server, exactly as it's named invelocity.tomlunder[servers]:server-name: survivalOptional: Redis. Turn on
redis:on every server with the samechannel. Without Redis, everything still works through the database; see below for what it changes.Restart the backends.
The proxy needs no plugin. BerryHomes uses the standard BungeeCord plugin message to move players, which Velocity supports out of the box (bungee-plugin-message-channel = true, the default).
What players see
- Homes on other servers show in
/homeswith their own template (home-elsewhere, a purple bed by default) and an "On" line, and in /home listwith the server's name. /home <home>on another server: the warmup and checks run here, the cost is charged here, then they're moved and placed on the home on arrival.- If the move doesn't happen (the server is down or full, the proxy refused it), they're told, and the cost is refunded after
cross-server.transfer-timeoutseconds. show-other-servers: falsehides other servers' homes entirely.
With and without Redis
| Without Redis | With Redis | |
|---|---|---|
| Cross-server teleports | Work | Work |
| Landing spot | Exact | Exact |
| An admin edits a player's homes on another server | The player sees it the next time they join that server | Shows on every server at once |
Homes are loaded from the database when a player logs in to a server, so a home they set on survival is always there when they join the lobby, Redis or not.
Limits across servers
per-server caps how many homes a player may have on one server, and sethome.disabled-servers stops homes being set on some servers (a lobby, say) while still letting players teleport from there.
limits:
per-server:
survival: 5
sethome:
disabled-servers: [lobby]
Heads up: the safety check only runs for homes on the server the player is on. A home on another server is taken as it is.