Resource icon

 MySQL Player Data Bridge 3.28.3

Resource icon
share any player data across servers. You can share data as: Economy accounts, Inventory and Armor, Enderchest, Potion Effects, Experience, Health and Food levels, Game Mode and Location. More data to sync will be added in time, if you have a request then post it in the Discussion Forum.

Do you want to save Essentials data on MySQL database? Or sync Essentials data across servers?
Then consider checking out my other plugin:

Features
  • Premium UUID and Offline UUID support for Spigot 1.7.5 to 1.12.2
  • Non UUID support for 1.6.4 and 1.7.2.
  • Works on Cauldron/KCauldron/Thermos 1.7.10 servers.
  • Works on MCPC Plus 1.6.4 servers.
  • MySQL Database only.
  • Share players data across servers, read below for what it can sync.
  • Everything can be customized using the plugin config file.
  • Supports any Economy system that works with Vault.
  • Support for Essentials Economy Eco commands.
  • Support for ChestShop plugin for offline sales/buy orders. (Only for UUID compatible servers).
  • Support for QuickShop plugin for offline sales. (Only for UUID compatible servers).
  • Support for Shop plugin for offline sales/buy orders. (Only for UUID compatible servers).
  • Support for AuctionHouse plugin for offline auctions. (Only for UUID compatible servers).
  • Support for CrazyAuctions plugin for offline auctions. (Only for UUID compatible servers. Requires custom plugin version DownloadHere).
  • Support for ShopChest plugin for sales/buy orders. (Only for UUID compatible servers).
  • Support for PlayerShopGUI+ plugin for offline sales. (Only for UUID compatible servers).
  • Support for combat tag plugins.
  • Support for custom health levels.
  • Full items NBT data saving. Full support for modded items.
  • Database maintenance options to remove inactive players.
  • Codded to use as little resources as possible and almost everything runs async away from the server main thread to prevent any server lag/tps drops.
  • Commands to reload config, import data and more.
  • Can remove folders and files when the server shut's down or restarts. For example you can delete the PlayerData folder as data is stored in MySQL with this plugin.
How does it work?
It listens for server join and leave events to sync the players data over a mysql database to share it over many servers. When a player leaves/disconnects a server the plugin uploads the players data to the mysql database. When the player joins the server the plugin checks the mysql database for his account and syncs it to the server he just joined.

What can you sync?
You can share any data that is stored in players.dat file also you can share players economy accounts.

Players Inventory and Armor
You can share anything inside players inventory and hotbar. Also since the equipped armor is a part of players inventory you can also share the armor. The selected hot bar slot will also be shared if inventory sync is enabled.

Players Game Mode
You can share players game mode across servers. (Survival; Creative; Adventure and Spectate)

Players Enderchest
You can share anything that is stored inside enderchests too.

Players experience points and levels
You can share players experience.

Players active potion effects
Any active potion effect can be shared.

Players health level
Health can be shared even if it's a custom size.

Players food and saturation level
Food and saturation levels can be shard too.

Players air level
Since air levels are also stored in player.dat file you can also share this if needed.

Players location
Sync players location across servers. This can be very useful on mirror servers. It will sync world location, X Y Z coordinates, Yaw and Pitch for exact facing direction. You can also sync players bed spawn location.

Players bed spawn location
Sync players bed spawn location. It will sync world location, X Y Z coordinates, Yaw and Pitch for exact facing direction.

Players economy (money) accounts
This is not stored inside player.dat file but sharing players money is very needed. It supports any economy system compatible with Vault, so you don't even need to have the same economy plugin on all servers you will share players data.

Dependencies
  • MySQL Database
  • (Optional) Vault - Download
  • (Optional) Any Economy system compatible with Vault - (only required for economy accounts sharing)
  • (Optional) ProtocolLib - Download
*Vault is required for economy accounts sync.
*ProtocolLib is required for Cauldron/KCauldron servers only!


Install instructions
Note: You need to install this plugin on all bukkit/spigot servers you want to keep data in sync, and set them to use the same database.
  • Place the plugin in the server plugins folder, and make sure you have all the dependency's.
  • Start the server to generate the config, then stop the server.
  • Open the config and set up the database connection details and configure the plugin. You need to create the database, then the plugin will create the tables on it's own.
  • Start the Server. Done, enjoy. Your player data will be shared on as many servers as you need.
Permissions:
MPDB.moderator
- Allow the use of inventory, armor and enderchest edit commands and also check and set balance commands. Default to OP.
MPDB.moderator.inventory - Allows to open and edit others inventory. Default to OP.
MPDB.moderator.armor - Allows to open and edit others armor. Default to OP.
MPDB.moderator.enderchest - Allows to open and edit others enderchest. Default to OP.
MPDB.admin - Allow the use of config reload and import data commands. Default to OP.
MPDB.cmd.enderchest - Access to open your enderchest by command with /mpdb end .Default to OP

Commands:
/mpdb
and /mpdb help - Display the help info.
/mpdb reload - MPDB.admin - Reload the plugin config.
/mpdb saveAndKick - MPDB.admin - Kick all players and save their data.
/mpdb importData - MPDB.admin - Import existing player data into the database, will skip users that are already in the database. It will import data of modules enabled in the config.
/mpdb importData <name> - MPDB.admin - Will only import data for the specified player, if player is already preset in the database will overwrite.
/mpdb delete <name> - MPDB.admin - Delete a player from the database.
/mpdb inv <name> - MPDB.moderator - Open and edit a player's inventory.
/mpdb armor <name> - MPDB.moderator - View and edit a player's armor.
/mpdb end - MPDB.cmd.enderchest - Open your enderchest by command.
/mpdb end <name> - MPDB.moderator - View and edit a player's ender chest.
/mpdb ecoBal <name> - MPDB.moderator - View a player's balance.
/mpdb ecoSet <name> <amount> - MPDB.moderator - Change a player's balance.
/mpdb getXp <name> - MPDB.moderator - View the player xp and level.
/mpdb setXp <name> <exp> - MPDB.moderator - Set a player xp or level.
/mpdb addXp <name> <exp> - MPDB.moderator - Add or remove xp or levels from a player.
*Replace <name> with the player name.
*Replace <amount> with the new balance.
*Replace <exp> with xp amount or levels, to add or set levels just add an l after the number for example: 5l , works the same as essentials xp system. You can also add negative numbers to remove xp or levels.


Configuration example:

By default everything is disabled, so you can enable exactly what you need.

Database Structure Example:

API:
This API allows you to check if players sync is complete. To access the API methods just use:
PD.api

There are also events available:
  • SyncCompleteEvent - Will trigger after sync is complete for all enabled modules.
  • InventoryArmorSyncCompleteEvent - Will trigger after Inventory and Armor sync is complete.
  • GameModeSyncCompleteEvent - Will trigger after game mode sync is complete.
  • EnderchestSyncCompleteEvent - Will trigger after enderchest sync is complete.
  • ExperienceSyncCompleteEvent - Will trigger after experience sync is complete.
  • HealthSyncCompleteEvent - Will trigger after health level sync is complete.
  • FoodSyncCompleteEvent - Will trigger after food level sync is complete.
  • AirSyncCompleteEvent - Will trigger after air level sync is complete.
  • PotionEffectsSyncCompleteEvent - Will trigger after potion effects sync is complete.
  • LocationSyncCompleteEvent - Will trigger after player location sync is complete.
  • BedSpawnSyncCompleteEvent - Will trigger after bed spawn location sync is complete.
  • EconomySyncCompleteEvent - Will trigger after economy sync is complete.

Useful Info

Issues with players not having the same UUID's when changing servers?

You need to make sure that all players have the same UUID's on all servers, this is important as player's data is stored based on their UUID and not their name. To have the same UUID's on all servers make sure that in the server config file spigot.yml on: settings > bungeecord: true , this will allow the server to get the player UUID from bungeecord and all servers will get the same UUID's. Make sure you have bungeecord: true on all spigot servers.

Issues with data save when you kick all players before server restart/shutdown?
Kicking all players before a server shutdown/restart can cause issues because when the plugin is disabling the server cancels all async tasks it is running. Normally when a player disconnects or is kicked his data is saved async to not lag the server, but when you kick all players this becomes a problem as if data save is not complete for all players when you do /stop the server will cancel them! If you don't kick players before the shutdown the plugin will save their data on the main thread so the server will wait for all data to be saved before shutdown. If you still need to kick all players before shutdown then use the command /mpdb saveAndKick it will save all data and kick all players for you in a safe way. Also this plugin will save players data and kick them when you run the stop or restart command, so you don't need to kick them using other plugins as this will safely save all data.

Dupe issues with pvp loggers plugins?
This plugin was built to support most pvp loggers plugins, however because how the sync works it will not be compatible with plugins that spawn a fake player when the real player disconnects in pvp action. The plugin will work fine if you just kill the player that disconnected to drop his inventory and keep the changes in sync.

You can install this plugin anytime.

Installing this plugin will not reset your players money, inventory or any data so it can be installed any time without losing existing players data. The plugin will first upload players data to mysql, after this the existing data will be the same on all servers you want to sync. You can also use the command /mpdb importData to import data from a server to sync on all other servers.

Modded items NBT data support.
Full NBT items data saving. This should cover any items data.

Found a problem or got a suggestion?
I'm happy to add new features and fix any issue you may find, just post it in plugins forum, the button Discussion.

Future updates.
In case the plugin will need to be updated we will do it as fast as we get the new minecraft version.

Note!
This plugin does not create an economy system! To share economy accounts you need Vault and an Economy plugin already installed. This plugin works with any economy system vault compatible.

Similar resources

MySQL Player Data Bridge 6
[1.6.4 - 1.16.1] Share players economy, inventory, enderchest, exp and more across servers.
5.00 star(s) 3 ratings
Downloads
235
Updated
MySQL Player Data Bridge MentegaTerbang
5.00 star(s) 2 ratings
Downloads
531
Updated
MySQL Player Data Bridge B
[1.6.4 - 1.10] Share players economy, inventory, enderchest, exp and more across servers.
3.83 star(s) 6 ratings
Downloads
1,397
Updated
BlackSpigot General Chat
Rules Help Users
    BlackSpigot.com @ BlackSpigot.com: my vip was not activated Hello, PM me the email you used to pay.
    Top