Point every server at the same MySQL or MariaDB database and they share one order board.
Set it up#
- Create an empty database and a user for it.
- In
plugins/OtOrders/config.ymlon every server, set the storage section to the same database:
server-name: survival
storage:
type: mysql
mysql:
host: localhost
port: 3306
database: minecraft
username: root
password: ''
pool-size: 6
table-prefix: otorders_
sync-interval-seconds: 2
- Give each server its own
server-name. - Restart every server. OtOrders creates its tables in the database.
mariadb is accepted as storage.type as well. Use the same table-prefix on every server.
How it behaves#
- New orders, deliveries and cancels show up on the other servers within
sync-interval-seconds. Every server also reads all active orders again once a minute. - Every delivery is one database transaction. Two players on different servers can never fill the same part of an order twice.
- Buyers get their delivery messages on whichever server they are playing, and collect their items on any server.
- Money is paid out and refunded through the economy of the server where the action happens. Use one shared economy on all servers, otherwise balances differ per server.
- Run every server on the same Minecraft version. An order for an item that does not exist on an older version is hidden there and logged once as
Order <id> is hidden on this server because <item> does not exist here.
What stays on one server#
config.yml and messages.yml are read per server. Keep them the same on every server so limits, fees and the blacklist match.