A comprehensive Bukkit/Spigot plugin for Minecraft 1.8 to 26.3 that synchronizes player data across multiple servers using MySQL, SQLite, or PostgreSQL databases. Perfect for multi-server networks with BungeeCord or Velocity.
Player inventories, experience, health, achievements, economy balance, and more are stored in a shared database whenever they leave a server and restored when they join again.
- Full Player Data Sync: Inventory, EnderChest, Armor, Offhand, Experience, Health, Hunger, Potion Effects
- Multi-Server Support: Shared database across multiple servers (BungeeCord/Velocity compatible)
- Economy Integration: Vault economy balance synchronization
- Achievements & Statistics: Sync player advancements and statistics
- Respawn to Lobby: Automatically send players to lobby server after death/respawn
- Version Compatibility: Supports Minecraft 1.8 - 26.2 with automatic feature detection
- Performance Optimized: Async operations, connection pooling, batch processing
- Management GUI: Interactive menu for toggling sync options (
/sync menu) - Maintenance Mode: Globally pause syncing for safe maintenance (
/sync maintenance) - Performance Profiling: Detailed tracking of save/load times (
/sync profile) - Database Support: MySQL, SQLite, PostgreSQL
This plugin supports Minecraft versions 1.8 to 26.3. Some features are automatically disabled on older versions:
- Offhand sync: Requires 1.9+
- Attribute sync: Requires 1.9+
- Advancement sync: Requires 1.12+
The plugin automatically detects the server version and enables/disables features accordingly.
- Download the latest release from the releases page
- Place the jar file in your server's
plugins/directory - Configure the database connection in
plugins/PlayerDataSync/config.yml - Restart your server
- Enable BungeeCord/Velocity integration if using a proxy network
The config.yml file contains all configuration options. Here's a basic setup:
# Server Configuration
server:
id: default # Unique identifier for this server instance
# Database Configuration
database:
type: mysql # Available options: mysql, sqlite, postgresql
mysql:
host: localhost
port: 3306
database: minecraft
user: root
password: password
ssl: false
max_connections: 10
# Player Data Synchronization Settings
sync:
coordinates: true # Player's current coordinates
position: true # Player's position (world, x, y, z, yaw, pitch)
xp: true # Experience points and levels
gamemode: true # Current gamemode
inventory: true # Main inventory contents
enderchest: true # Ender chest contents
armor: true # Equipped armor pieces
offhand: true # Offhand item
health: true # Current health
hunger: true # Hunger and saturation
effects: true # Active potion effects
achievements: true # Player advancements/achievements
statistics: true # Player statistics
attributes: true # Player attributes (max health, speed, etc.)
economy: true # Sync economy balance (requires Vault)
# Automatic Save Configuration
autosave:
enabled: true
interval: 1 # seconds between automatic saves, 0 to disable
on_world_change: true # save when player changes world
on_death: true # save when player dies
on_server_switch: true # save when player switches servers (BungeeCord/Velocity)
on_kick: true # save when player is kicked
async: true # perform saves asynchronously
# Integration Settings
integrations:
bungeecord: false # enable BungeeCord/Velocity support
vault: true # enable Vault integration for economy
placeholderapi: false # enable PlaceholderAPI support
invsee: true # enable InvSee++ style inventory viewing integration
openinv: true # enable OpenInv style inventory viewing integration
# Respawn to Lobby Feature
# Sends players to a lobby server after death/respawn
# Requires BungeeCord or Velocity integration to be enabled
respawn_to_lobby:
enabled: false # enable respawn to lobby feature
server: lobby # name of the lobby server (must match BungeeCord/Velocity server name)
# Performance Settings
performance:
connection_pooling: true # use connection pooling for better performance
async_loading: true # load player data asynchronously on join
disable_achievement_sync_on_large_amounts: true # disable achievement sync if more than 1500 achievements exist
achievement_batch_size: 50 # number of achievements to process in one batch
achievement_timeout_ms: 5000 # timeout for achievement serialization (milliseconds)
max_achievements_per_player: 2000 # hard limit to prevent infinite loops
# Message Configuration
messages:
enabled: true
show_sync_messages: true # show sync messages when loading/saving data
language: en
prefix: "&8[&bPDS&8]"
colors: trueThe Respawn to Lobby feature automatically sends players to a designated lobby server after they die and respawn. This is perfect for game servers where players should return to a hub after death.
Requirements:
- BungeeCord or Velocity integration must be enabled
- The lobby server name must match the server name in your proxy configuration
Configuration:
respawn_to_lobby:
enabled: true # Enable the feature
server: lobby # Server name from your proxy configThis project uses Maven. To build the plugin:
# Clone the repository
git clone https://github.com/DerGamer009/PlayerDataSync.git
cd PlayerDataSync
# Build for default version (1.21)
mvn clean package
# Build for specific Minecraft version
mvn clean package -Pmc-1.8 # Minecraft 1.8 (Java 8)
mvn clean package -Pmc-1.9 # Minecraft 1.9-1.16 (Java 8)
mvn clean package -Pmc-1.17 # Minecraft 1.17 (Java 16)
mvn clean package -Pmc-1.18 # Minecraft 1.18-1.20 (Java 17)
mvn clean package -Pmc-1.21 # Minecraft 1.21+ (Java 21)
mvn clean package -Pmc-26.3 # Minecraft 26.3 (Java 25)The resulting jar file will be in the target/ directory.
The build process uses Maven Shade plugin to bundle required dependencies directly into the final jar, so no additional libraries need to be installed on the server.
To use PlayerDataSync across multiple servers:
- Configure the same database on all servers
- Enable BungeeCord/Velocity integration in
config.yml:integrations: bungeecord: true
- Set unique server IDs for each server (optional, defaults to "default"):
server: id: survival # Different ID for each server
- Enable server switching autosave:
autosave: on_server_switch: true
The plugin will automatically save player data when they switch servers and restore it when they join a new server.
If you experience server freezing or lag when players join, it may be caused by achievement synchronization. The plugin includes automatic protection, but you should:
- Set
performance.disable_achievement_sync_on_large_amounts: truein config.yml - Consider setting
sync.achievements: falseif problems persist - Monitor server logs for timeout warnings
For servers with many achievements (1500+), the plugin automatically:
- Disables sync if too many achievements exist
- Processes achievements in batches
- Loads asynchronously to avoid blocking the main thread
performance:
connection_pooling: true
async_loading: true
disable_achievement_sync_on_large_amounts: true
achievement_batch_size: 50
achievement_timeout_ms: 5000
max_achievements_per_player: 2000If you experience performance issues, you can disable achievement synchronization entirely:
sync:
achievements: false # Disable achievement sync to prevent lag- β Issue #45 - XP Sync: Fixed experience synchronization not working across versions 1.8-1.26.2
- β Issue #46 - Vault Balance de-sync: Fixed economy balance not being saved on server shutdown
Server Freezing:
- Set
sync.achievements: falsein config.yml - Enable performance settings (see above)
- Check server logs for timeout warnings
Economy Balance Not Syncing:
- Ensure Vault and an economy plugin are installed
- Check that
sync.economy: truein config.yml - Verify Vault integration is enabled:
integrations.vault: true
Players Not Switching Servers:
- Enable BungeeCord/Velocity integration:
integrations.bungeecord: true - Verify server names match your proxy configuration
- Check that
autosave.on_server_switch: trueis enabled
Data Not Syncing:
- Verify database connection settings
- Check server logs for database errors
- Ensure all servers use the same database
- Verify server IDs are set correctly (if using multiple servers)
- β Minecraft 1.8 - 26.3: Full compatibility with automatic feature detection
- β Paper 1.20.4 - 26.3: Full compatibility
- β Spigot 1.8 - 26.3: Full compatibility
compatibility:
safe_attribute_sync: true # Use reflection-based attribute syncing
disable_attributes_on_error: false # Auto-disable attributes if errors occur
version_check: true # Perform version compatibility checks on startupThe plugin automatically detects the server version and enables/disables features accordingly.
The plugin uses the following permissions:
playerdatasync.*- All permissionsplayerdatasync.message.show.loading- Show loading messagesplayerdatasync.message.show.loaded- Show loaded messagesplayerdatasync.message.show.saving- Show saving messagesplayerdatasync.message.show.errors- Show error messages
The plugin uses bStats and FastStats to collect anonymous usage statistics. This helps us understand feature adoption and improve the plugin.
- Metrics Documentation: METRICS.md
You can disable metrics in the config.yml:
metrics:
bstats: true
faststats: trueContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- GitHub: https://github.com/DerGamer009/PlayerDataSync
- Issues: https://github.com/DerGamer009/PlayerDataSync/issues
- Releases: https://github.com/DerGamer009/PlayerDataSync/releases
See CHANGELOG.md for a detailed list of changes.
- Reliable XP synchronization using
giveExp()method - Works across all Minecraft versions (1.8-26.2)
- Automatic verification and correction if XP doesn't match
- Synchronizes economy balance across servers
- Requires Vault and an economy plugin (e.g., EssentialsX, CMI)
- Ensures balance is saved on server shutdown
- Full inventory synchronization
- EnderChest support
- Armor and offhand items
- Client synchronization after loading
- Automatically sends players to lobby server after death
- Uses BungeeCord/Velocity server switching
- Saves player data before transfer
- Smart detection to prevent unnecessary transfers
- MySQL: Full support with connection pooling
- SQLite: File-based database for single-server setups
- PostgreSQL: Experimental support
If you encounter any issues:
- Check the Issues page
- Review server logs for error messages
- Verify your configuration matches the examples
- Create a new issue with details about your problem
Made with β€οΈ for the Minecraft community