One market across several servers (Premium)¶
Point every server at the same database and they share one auction house. A listing made on the survival server is in the hall on the skyblock server seconds later, and the collection box follows a player wherever they log in.
server-name: "survival" # so listings say where they came from
database:
enabled: true
host: 127.0.0.1
port: 3306
database: ember
username: ember
password: "..."
poll-seconds: 5
The driver is fetched by Paper's own library loader, so nothing is bundled into the jar and no other plugin's database driver is shadowed.
How selling stays honest¶
Every sale runs one conditional statement:
The database decides who won, once, for the whole network. Whoever gets the row hands over the goods; everyone else is told it has already gone. There is no window in which two servers both believe they sold the same item, which is the entire problem with a shared market and the reason this is not simply a save routine pointed at MySQL.
If the database cannot be reached, sales are refused rather than guessed at, and the plugin says so in the console.
What you also need¶
Your economy has to be shared too, or money will not follow the goods: one Vault economy against one database, or Ember Coins with its accounts on shared storage.
What is not shared yet¶
Buy orders, the price index, the watchlist and the statistics that feed leaderboards are still per server. Listings and collection boxes - the two that can lose or duplicate an item - are network-wide.