Skip to content

Storage

natan307 edited this page Nov 15, 2026 · 1 revision

Storage (SQLite and MySQL)

Command+ stores SignSpy and LogBlock history in a database. Everything else (freeze, lockdown, toggles) is kept in memory only and resets on restart.

The SQLite and MySQL drivers are bundled with Paper and Spigot, so there is nothing to download.

SQLite (default)

No setup. The database is a single file in plugins/CommandPlus/.

storage:
  type: sqlite
  sqlite-file: commandplus.db

Best for small and medium servers. To back it up, stop the server and copy the file.

MySQL / MariaDB

  1. Create an empty database and a user with full access to it.
  2. Fill in the connection details.
  3. Restart the server.
storage:
  type: mysql
  mysql:
    host: localhost
    port: 3306
    database: commandplus
    username: commandplus
    password: "your-password"
    use-ssl: false

Tables are created automatically on first start. They all start with commandplus_, so the database can be shared with other plugins.

Best for networks, or when you want to browse or back up history with normal database tools.

Behavior

  • All database work runs on a separate background thread, so it does not block the server tick.
  • Block logs are queued and written in batches every logblock.flush-seconds seconds. The queue is flushed when you run /logblock and when the server stops.
  • Old rows are deleted at startup based on logblock.retention-days and signspy.retention-days.
  • If the connection is lost, MySQL reconnects automatically on the next operation.

Switching storage type

History is not migrated between SQLite and MySQL. Switching starts with an empty history. The old data stays in the old database, so you can switch back.

If storage fails to start

The plugin keeps running, but /signspy history, /signspy tp, /signspy clear and /logblock will report that the database is unavailable. The console shows the reason. See the FAQ.

Clone this wiki locally