-
Notifications
You must be signed in to change notification settings - Fork 0
Storage and Data
RoyalAuctions stores listings, the collection, and bids in SQLite by default, or MySQL for a network / shared setup.
storage:
type: SQLITE # or MYSQL
sqlite-file: auctions.db
mysql:
host: localhost
port: 3306
database: royalauctions
username: root
password: ""
properties: "useSSL=false&characterEncoding=utf8&allowPublicKeyRetrieval=true"
pool-size: 10Connections are pooled with HikariCP over JDBC. Tables: ra_listings, ra_collection, ra_bids.
-
SQLite — zero setup, single file (
auctions.dbin the plugin folder). Right for a single server. -
MySQL — point several servers at one database so listings are shared network-wide. Fill in the
mysqlblock and settype: MYSQL.
Items are serialized with Paper's serializeAsBytes(), which preserves the full NBT / component data. That's why:
- eco custom items survive a listing intact, with no per-plugin code, and
- a listed item even survives the eco plugin being uninstalled — the bytes are self-contained.
The listing row only ever stored the current top bidder — so once a player was outbid, there was no record they'd ever bid, which made "auctions I've bid on" unknowable. Every bid is now recorded in ra_bids, which powers View Bids (/ah bids).
Not backfillable. Only bids placed from the version that introduced
ra_bidsonward appear in View Bids — there's no historical data to reconstruct for older bids.
A listing's category and tier are computed when it's created and stored on the row; browsing never recomputes them. Consequences:
- Renaming a category id would strand old listings — so RoyalAuctions re-derives and persists those on load (see Categories).
- Listings created before tiers existed have no tier and show only under No Filter (see Item Tiers).
Every expiry-sweep-minutes (default 5), the plugin sweeps for expired listings and returns each expired item to its seller's Collection. Nothing is deleted — an unsold item comes back to be reclaimed with /ah collect.
RoyalAuctions doesn't ship a backup command. For SQLite, copy auctions.db while the server is stopped (or use a scheduler/OS job). For MySQL, back up with your normal database tooling. Don't copy the live .db file while the server is running.
To wipe all auction data, stop the server and delete auctions.db (SQLite) or drop the ra_* tables (MySQL). A fresh schema is created on next start.
RoyalAuctions · part of the eco suite (RoyalBank · RoyalBazaar · EconGuard) · Source on GitHub
Getting started
Using it
- Buying, Selling & Bidding
- Menus & GUI
- Categories
- Item Tiers
- NPCs (Citizens)
- PlaceholderAPI
- EconGuard Integration
- Storage & Data
Help