Black Friday Black Friday SALE: 40% off every resource until December 1. Shop the sale

Sharing orders between servers

Connect several servers to one MySQL or MariaDB database so they share one order board.

On this page

Point every server at the same MySQL or MariaDB database and they share one order board.

Set it up#

  1. Create an empty database and a user for it.
  2. In plugins/OtOrders/config.yml on 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
  1. Give each server its own server-name.
  2. 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.

Last updated

Still stuck? Open a ticket on the help page or ask in Discord. Mention your version and what you tried.