PrivateChest Plus Bedrock/Java icon

PrivateChest Plus Bedrock/Java -----

Protect your storage with ease and secure, powerful, and lightweight



PostgreSQL Support & Automatic Driver Management
PrivateChestPlus v2.3 — Changelog
PostgreSQL Support & Automatic Driver Management
New Features
Full PostgreSQL Support
  • PostgreSQL can now be used as a storage backend alongside MySQL and YAML.
  • Configuration in config.yml under the postgresql: section with the same parameters as MySQL (host, port, database, username, password, ssl, pool).
  • To enable it, set storage.type to postgresql (also accepts postgres or pgsql).
Automatic JDBC Driver Management
  • The plugin no longer requires the MySQL or PostgreSQL driver to be pre-installed on the server.
  • When starting with storage.type: mysql or postgresql, the plugin will:
    1. Check if the driver is available on the server classpath.
    2. If not found, look in plugins/PrivateChestPlus/libs/.
    3. If not present, automatically download it from Maven Central (with a fallback URL).
    4. Attempt to load it dynamically without requiring a restart.
    5. If dynamic loading fails, inform that a restart is needed and temporarily fall back to YAML.
  • Downloaded drivers are stored in plugins/PrivateChestPlus/libs/ and reused on future startups.
  • The plugin size remains lightweight (~400KB) by not bundling drivers in the jar.
Safe Data Migration Between Backends
  • Built-in migration system to move data between YAML, MySQL, and PostgreSQL.
  • Migration verifies data integrity before confirming.
  • Original data is never deleted during migration.
Configuration Changes
New in config.yml
Code (YAML):
# Options: yaml, mysql, postgresql
storage
:
  type
: yaml

# New PostgreSQL section
postgresql
:
  host
: localhost
  port
: 5432
  database
: privatechestplus
  username
: postgres
  password
: yourpassword
  table
: protected_chests
  ssl
: false
  audit-table
: privatechest_audit
  pool
:
   min-size
: 2
   max-size
: 10
   connection-timeout
: 30000
   validation-timeout
: 5000
The mysql: section remains unchanged and continues to work exactly as before.

Technical Fixes
  • Schema initialization: Table creation is now synchronous, eliminating a potential race condition where the plugin could attempt to read data before tables existed (affected first startup with an empty database).
  • Improved connection pool: Internally refactored to be generic and reusable between MySQL and PostgreSQL, with the same performance parameters.
Backward Compatibility
  • Users with storage.type: yaml → No changes, works exactly the same.
  • Users with storage.type: mysql → No changes, works exactly the same.
  • No action required when upgrading from v2.2 to v2.3.
  • The libs/ folder is only created automatically if a driver needs to be downloaded.
Notes for Server Administrators
  • If your server already includes the MySQL driver (most Spigot/Paper builds do), nothing will be downloaded.
  • For PostgreSQL, the driver will be automatically downloaded on first use (~1MB).
  • If your server blocks outbound connections, you can manually download the driver and place it in plugins/PrivateChestPlus/libs/.
  • Migration between backends is one-directional per execution. To migrate from MySQL to PostgreSQL, run the migration and then change storage.type in config.
----------, May 11, 2026
Resource Information
Author:
----------
Total Downloads: 6
First Release: May 17, 2025
Last Update: May 11, 2026
Category: ---------------
All-Time Rating:
1 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings