DUXPLIMA Documentation

Database

SQLite or MySQL in Database.yml, what is stored, and how often it is written.

uxmPVPCore stores statistics, battle logs and beginner protection in a database. File: plugins/uxmPVPCore/Database.yml. Changes need a restart.

SQLite or MySQL

database.typeUse it when
SQLITE (default)One server. Nothing to set up: the data goes into plugins/uxmPVPCore/database.db
MYSQLA network, or you want to read the data from a website or another tool. MariaDB servers work too
database:
  type: MYSQL
  mysql:
    host: localhost
    port: 3306
    database: uxmpvpcore
    username: pvpcore
    password: "change-me"
    prefix: apc_
KeyDefaultMeaning
database.typeSQLITESQLITE or MYSQL
database.mysql.host, portWhere the database server is
database.mysql.databaseuxmpvpcoreThe database name. Create it first
database.mysql.username, passwordThe account the plugin logs in with
database.mysql.prefixapc_Put before every table name, so the tables do not clash with other plugins. Only for MySQL

The file also has connection pool and SQLite tuning settings, with the pool named uxmPVPCore-Pool. Leave them as they are unless you know you need to change them.

The tables are created on the first start. Moving from SQLite to MySQL does not copy the data.

What is stored

DataWritten
Player statistics and ratingEvery flushMinutes (10) in StatisticSettings.yml, when a player leaves, and on shutdown
Battle logs and their detailsEvery flushMinutes (10) in BattleLogs.yml, and on shutdown
Beginner protectionAt once
BlockRegen nodesIn their own SQLite file, blockregen.db, whatever database.type says

Battle logs are deleted after the days set in retentionSettings, see Battle Logs.

Several servers

With MySQL, several servers can share one database, so a player's statistics follow them across the network. Each server keeps the players it has in memory and writes them every few minutes, so when a player switches server, give the old server a moment to write first: keep saveOnQuit: true in StatisticSettings.yml.

Related: Configuration, Statistics and Rating