Servers that use the same database share one auction house.
Set it up#
- Create a database on a MySQL or MariaDB server that all your Minecraft servers can reach.
- On every server, open
plugins/OtAuctions/config.ymland set:
server-name: survival
storage:
type: mysql
mysql:
host: localhost
port: 3306
database: minecraft
username: root
password: ''
pool-size: 6
table-prefix: otauctions_
sync-interval-seconds: 2
- Give each server its own
server-name, for examplesurvivalandskyblock. - Use the same
table-prefixand database on all servers. - Restart every server. Storage changes are not picked up by
/ah admin reload.
The console shows enabled with MySQL storage when the connection works. OtAuctions creates its tables itself.
Note
Existing listings in the SQLite file are not moved to MySQL. The auction house starts empty on the new database.
How it behaves#
- New listings, sales and cancellations show up on the other servers within
sync-interval-seconds. Each server also does a full refresh once a minute. - The database decides a purchase. Two players on different servers cannot buy the same listing.
- Sellers get their sale message on the server they are playing on, within
sync-interval-seconds. - Run every server on the same Minecraft version. An item saved on a newer version cannot be read by an older server. That server hides the listing and logs
Listing <id> is hidden on this server because its item cannot be read here.