AT-MailBox logoAT-MailBox

Storage

How and where mailbox data is stored, and how to use a shared database.

Mailbox items are saved in a database so they survive restarts. AT-MailBox supports four backends. SQLite is the default and needs no setup.

Picking a backend

Set database.type in config.yml:

TypeSetupUse it when
SQLITENoneOne server. The default and easiest.
H2NoneOne server. An embedded file database.
MYSQLConnection detailsA network sharing one database.
MARIADBConnection detailsA network sharing one database.
database:
  type: "SQLITE"
  host: "localhost"
  port: '3306'
  name: "atmailbox"
  username: "root"
  password: ""
  table-prefix: "atmailbox_"

The host, port, name, username, and password are used only by MYSQL and MARIADB. SQLITE and H2 write a file inside the plugin folder.

Drivers are automatic

You do not install any JDBC driver. TheAPI downloads the driver for your chosen backend the first time it connects.

TheAPI needs to reach the internet on first connect to fetch the driver. On an offline machine, that download has to succeed at least once.

Table names

The plugin creates a table named <prefix>entries, using table-prefix. With the default prefix that is atmailbox_entries. Change the prefix if you share one database with other plugins and want to avoid name clashes.

Sharing across a network

To give players the same mailbox on every server in a network, point each server at the same MySQL or MariaDB database with the same table-prefix. Use the same settings everywhere.

On this page