Skip to content

Storage

TheCommandCraft edited this page Apr 6, 2026 · 3 revisions

Storage

Vanish++ stores per-player data (vanish state, rules, vanish level, acknowledgements) in a configurable backend.

Options

Type Use Case
YAML Default. Single-server, no database required.
MYSQL Network database. Recommended for multi-server setups.
POSTGRESQL Network database. Alternative to MySQL.

📁 plugins/Vanishpp/config.ymlstorage.type: "YAML"
🔧 In-game: /vconfig storage.type MYSQL
🔄 Apply: /vreload


YAML (Default)

No setup required. Data is stored in plugins/Vanishpp/data.yml.

Limitations: Not shared across servers. If you run multiple servers, each has its own independent vanish state.


MySQL

📁 plugins/Vanishpp/config.yml:

storage:
  type: "MYSQL"
  mysql:
    host: "localhost"
    port: 3306
    database: "vanishpp"
    username: "root"
    password: "yourpassword"
    use-ssl: false
    pool-size: 10

🔧 Individual keys: /vconfig storage.mysql.host db.example.com
🔄 Apply: /vreload

Create the database before starting the server:

CREATE DATABASE vanishpp;

The plugin creates all tables automatically on startup.


PostgreSQL

📁 plugins/Vanishpp/config.yml:

storage:
  type: "POSTGRESQL"
  mysql:
    host: "localhost"
    port: 5432
    database: "vanishpp"
    username: "postgres"
    password: "yourpassword"
    use-ssl: false
    pool-size: 10

🔧 In-game: /vconfig storage.type POSTGRESQL
🔄 Apply: /vreload

Note: PostgreSQL uses the same mysql: block in the config - the type field controls which driver is used.


Schema Versioning

The plugin tracks a schema version in vpp_schema_version and runs migrations automatically on startup. This allows future schema changes without manual SQL. Migrations are idempotent - safe to run multiple times (e.g. on reload).

Performance

All storage I/O is asynchronous - database reads/writes never block the main server thread. Vanish state and rules are cached in memory per-player on join and flushed on quit, so hot paths (block breaks, entity damage, etc.) never hit the database.

Database Connection Monitoring

If the database connection fails, staff with vanishpp.admin or OP status are notified in-game. Notifications are throttled to every 5 minutes to prevent spam.

Cross-Server Sync

For cross-server vanish synchronization, see Redis Cross-Server Sync.

Proxy Plugin Access

For reading vanish state from proxy plugins (BungeeCord/Velocity), see Proxy Plugin Compatibility.

Clone this wiki locally