-
Notifications
You must be signed in to change notification settings - Fork 0
Database & Storage
AFK Area uses VertexCore's persistence layer for AFK areas, households, completed session history and player statistics.
The backend is configured in config.yml.
json
h2
mysql
The mysql backend can be used with compatible MySQL or MariaDB servers.
Default:
database:
backend: jsonJSON needs no external database.
VertexCore stores flat-file records below:
plugins/AFKArea/data/
Records are separated into backend-managed table directories and stored as JSON files.
database:
backend: h2H2 uses a local database rooted at:
plugins/AFKArea/database
No external database server is required.
Example:
database:
backend: mysql
mysql:
url: "jdbc:mysql://localhost:3306/minecraft"
user: "minecraft"
password: "your-password"The JDBC URL and user must be set when mysql is selected.
database:
use-queue: true
timeout-millis: 5000
pool-size: 5
table-prefix: afkarea_Uses VertexCore's queued asynchronous database execution.
Default:
true
Default:
5000
Must be greater than 0.
Maximum JDBC connection-pool size.
Default:
5
Must be greater than 0.
Default:
afkarea_
May contain only letters, numbers and underscores.
- Technical ID
- Display name
- Enabled state
- Priority
- Region definition
- Teleport destination
- Reward configuration
- Household ID
- Member UUIDs
Completed AFK area sessions.
- Session count
- Total time
- Longest session
- Last session
- Last area
- Last session end time
Database settings are initialized at startup.
If they are changed and /afkarea reload is used, the new database settings do not take effect until a server restart.
Restart after changing:
- Backend
- JDBC URL
- User/password
- Pool size
- Table prefix
Changing database.backend changes the active storage backend.
AFK Area does not provide an in-game migration command between JSON, H2 and MySQL.
Before changing an existing server:
- Stop the server.
- Back up
plugins/AFKAreaand any external database. - Plan the data transfer.
- Change the backend settings.
- Start and verify the new backend before removing old data.
For JSON or H2, back up:
plugins/AFKArea/
For MySQL/MariaDB, also use your database server's normal backup tools.
AFK Area Wiki
Setup
Administration
Integrations & Storage
Help