Overview
ClansPlus supports multiple database types for storing clan and player data. Proper database configuration ensures optimal performance and data integrity.Database Types
Database system to use for storing data.Available Options:
H2- Embedded SQL database (Recommended)YAML- Flat file storage
H2 is recommended for better performance and data integrity, especially for servers with many clans.
H2 Database (Recommended)
H2 is a fast, embedded SQL database that runs directly within the plugin. It provides:- Better performance than YAML
- Efficient data queries
- Built-in data validation
- No external database server required
YAML Database
YAML stores data in flat files. It’s simpler but slower for large datasets:- Easy to read and manually edit
- Lower performance with many clans
- Larger file sizes
- Risk of corruption if manually edited incorrectly
Performance Settings
Smart Loading
Load only data for players who are in clans at server startup.This significantly reduces startup time on servers where many players have no clan. Players without clans have their data loaded on-demand when they join a clan.
Auto-Save
Automatically save all clan and player data at regular intervals.
Data is also saved when the server shuts down properly. Auto-save provides additional protection against crashes.
Interval in seconds between automatic saves (default: 900 = 15 minutes).Lower values provide more frequent backups but may impact performance on servers with many clans.
Bug Fixes
Automatically detect and fix invalid data during plugin load.Older versions of ClansPlus may have had issues causing data inconsistencies like:
- Clans without a leader
- Orphaned player data
- Invalid rank assignments
Backup Settings
Date format for backup file names using Java SimpleDateFormat.Common Format Patterns:
HH- Hour (00-23)mm- Minute (00-59)ss- Second (00-59)MM- Month (01-12)dd- Day (01-31)yyyy- Year (4 digits)
14-30-45 03-09-2026 for March 9, 2026 at 2:30:45 PMSee SimpleDateFormat documentation for all format options.H2 Database Configuration
Name of the H2 database file (stored in the plugin folder).The full path will be:
plugins/ClansPlus/h2Database.mv.dbName of the database table storing clan information.
Name of the database table storing player information.
Example Configuration
H2 Database (Recommended)
config.yml
YAML Database
config.yml
Transferring Between Database Types
You can migrate data between YAML and H2 databases:Step 1: Backup Current Data
- Stop your server
- Create a backup of your entire
plugins/ClansPlus/folder - Store the backup in a safe location
Step 2: Change Database Type
- Open
config.yml - Change the
database.typesetting to your desired type:
Step 3: Transfer Data
ClansPlus does not include built-in migration tools. You’ll need to use admin commands or manually transfer data.
- Start with the new database type
- Clans will need to be recreated
- Suitable for testing or starting over
- Some versions may support export/import commands
- Check the plugin’s admin commands with
/clanadmin help - Contact the developer on Discord for migration assistance
- Community-created migration scripts may be available
- Check the ClansPlus Discord community
Step 4: Test and Verify
- Start your server with the new database type
- Check console for any errors
- Verify clan data is accessible
- Test creating new clans
- Keep your backup until you’re certain everything works
Troubleshooting
Database File Location
H2 Database:Common Issues
“Database locked” errors:- Another process is accessing the database
- Check if multiple servers are using the same data folder
- Ensure proper server shutdown
- Enable
smart-loadingto reduce startup time - Consider switching from YAML to H2
- Increase
auto-save.secondsto reduce save frequency
- Enable
fix-bug-databaseto auto-repair - Restore from backup if issues persist
- Report persistent issues on Discord
- Check that auto-save is enabled
- Verify database files exist and aren’t empty
- Check console logs for save errors
Best Practices
- Use H2 Database - Better performance and reliability
- Enable Auto-Save - Protects against crashes
- Regular Backups - Manually backup before major updates
- Enable Smart Loading - Faster server starts
- Monitor Console - Watch for database errors during startup
- Test Changes - Try configuration changes on a test server first
For additional help, join the official ClansPlus Discord server: https://discord.gg/NWbTVddmBM
