Essentials MySQL Storage Extension v1.31.0

[1.7.10 - 1.21] Adds MySQL database storage to the popular Essentials plugin.
A bukkit/spigot plugin that is an extension to Essentials and adds MySQL Database storage for users data files, works with Essentials, EssentialsX or Spigot-Essentials plugins. Tired of having 200k+ user files? Then this plugin stores everything in a database and allows you to get rid of that Essentials/userdata folder, will make life easier when running server backups or even opening the userdata folder. It will even allow you to sync Essentials user data across servers.

Do you want to save players data (Inventory, Enderchest, Money, Health, Exp and more...) on MySQL database? Or sync players data across servers?

Then check out my other plugin:
MPDB-small.png
MySQL Player Data Bridge


Features


  • Online and Offline UUID support! Does no work on non UUID servers, so will will work on 1.7.10 and up.
  • Add MySQL storage for Essentials userdata files.
  • Option to remove inactive users from the database.
  • Saves all data that is stored in the user data files. (Ex. homes, money, mails... everything)
  • Allows you to sync essentials data across servers.
  • Support for QuickShop or QuickShop Reremake plugin for offline sales.
  • Support for ChestShop plugin for offline sales and buy orders.
  • Support for AuctionHouse plugin for offline auctions.
  • Support for PlayerShopGUI+ plugin for offline sales.
  • Support for ShopChest plugin for offline sales and buy orders.
  • Option to delete the entire Essentials/userdata folder on server shutdown or restart.
  • Option to delete user data files when players leave the server and data is saved on database.
  • Command to import all users data files to the database.
  • Command to export all users from the database back into essentials userdata files. So you can remove the plugin anytime without data loss.
  • Command to get Balance Top from the database data.
  • Ability to filter the players data file and remove data that you don't what to save.
  • Very configurable, check the config sample below.
  • Light, will use little resources and tasks run async to not impact the server performance or TPS.

How does it work?
When the player leaves the server his essentials data file is saved on the database. Then when he joins the server his essentials data file is deployed from the database to the Essentials/userdata folder and hook into Essentials to load it. This plugin does not change the way Essentials work, but manipulates the user data files to save them on the database.


Dependencies


*These are all required dependency's.
*Only 1 of the 3 Essentials plugins listed above you must have installed. DO NOT INSTALL all of them.



Install instructions


  1. Place the plugin in the server plugins folder, and make sure you have Essentials installed.
  2. Start the server to generate the config, then stop the server.
  3. 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.
  4. Start the Server. Check the server log and make sure everything is ok. Done, enjoy.

Permissions
EMS.admin
- Unlock access to the import/export data command. Default to op.

EMS.baltop - Unlock access to the /ems baltop command. Default to op.


Commands
/ems
and /ems help - Display the help menu.

/ems baltop - EMS.baltop - Get Money Top 10 from the database.
/ems reload - EMS.admin - Reload plugin config.
/ems import - EMS.admin - Import all users files from the Essentials/userdata folder to the database. Will skip users already in the database or broken data files.
/ems export - EMS.admin - Export all users from the database back into essentials userdata files. Will not remove the users from the database. Make sure you disable removal of essentials userdata folder or files before export.
/ems saveAndKick - EMS.admin - Kick all players and save their data.
/ems remove <name> - EMS.admin - Delete a specific user from the database.


Config sample
#MySQL Database details
Database:
Mysql:
#MySQL server address

Host: 127.0.0.1
#MySQL server port (default 3306)

Port: 3306
#Database name (NOTE! You need to create the database, then the plugin will create the tables.)

DatabaseName: 'mydatabase'
#Table name (the plugin will auto create them)

TableName: 'Essentials_userdata'
#User name

User: 'admin'
#User password

Password: 'cheesecake'
#SSL connection

SslEnabled: false
#This maintenance task runs async with a 2 min delay after the server starts.

RemoveInactiveUsers:
#Enable or disable database clean up of old accounts. | (true or false)

enabled: false
#Inactivity in days. Default 60 days.

inactivity: 60


#Plugin settings

Settings:
#Built in support for other plugins.

# NOTE! A server restart is needed for changes here to take effect!
SupportFor:
#Support for QuickShop plugin: https://www.spigotmc.org/resources/quickshop.18676/

#If you use Essentials Economy and QuickShop plugin enable this option. If you use other economy plugin keep it disabled.
#Set the tax value same as in QuickShop config. To disable set: QuickShopTax: 0.00
QuickShop: false
QuickShopTax: 0.05
#Support for ChestShop plugin: https://dev.bukkit.org/projects/chestshop

##If you use Essentials Economy and ChestShop plugin enable this option. If you use other economy plugin keep it disabled.
ChestShop: false
#Enable support for plugin ShopChestPlayerShopGUI+: https://www.spigotmc.org/resources/playershopgui.37707/

PlayerShopGUI-Support: false
#Enable support for plugin AuctionHouse: https://www.spigotmc.org/resources/auction-house-1-7-1-11.6050/

AuctionHouse-Support: false
#Enable support for plugin ShopChest: https://www.spigotmc.org/resources/shopchest.11431/

ShopChest-Support: false
#Delete the entire Essentials/userdata folder on server shutdown or restart.

#NOTE! Will delete all users files. Make sure you import them first.
RemoveUserDataFolder: false
#Delete the data file for players that leave the server after his data is saved on database.

RemoveUserFile: false
#Save online players data files to database. If this is disabled the data will be saves only when the player leaves the server.

SaveDataTask:
#Enable or disable the data save task. | (true or false)

enabled: true
#Time between data saves in minutes. | Default 3 min.

interval: 3
#Hide the data save task log messages.

hideLogMessages: false
#Prevent saving of some Essentials users data.

SaveFilter:
#Enable or disable the filter.

enabled: false
#The following data will be removed from essentials users data file when saving.

preventSaveOf:
- 'logoutlocation'
- 'lastlocation'
#Add support for essentials commands when players are offline.

EssentialsCmdIntegration:
#Support for essentials /pay command for offline players.

PayCmd: true
#Support for essentials /balance command for offline players.

BalanceCmd: true
#Support for essentials /seen command for offline players.

SeenCmd: true
#Support for essentials /eco commands for offline players.

EcoCmd: true

#Chat messages with color and format codes support.

#Minecraft Color and Format Codes: http://minecraft.gamepedia.com/Formatting_codes
ChatMessages:
NoPermission: '&4[EMS] &cYou don''t have permission!'
ImportCmd: '&2[EMS] &aImport essentials data started! Check server console for progress.'
ExportCmd: '&2[EMS] &aExport essentials data started! Check server console for progress.'
CmdNotFound: '&4[EMS] &cCommand not found! For help do /ems'
MoneySymbol: '$'
MoneySyncDisabled: '&4[EMS] &cMoney sync is disabled.'
BalTopTitle: '&6&l Money Top 10'
BalTopUpdate: '&2[EMS] &aUpdating Money Top 10 list...'
BalTopEmptyDB: '&4[EMS] &cDatabase is empty!'
BalTopUsage: '&4[EMS] &cUsage: &6/baltop'
RemoveCmdUsage: '&6[EMS] &eUsage: &6/ems delete <name>'
RemoveCmdComplete: '&2[EMS] &aUser removed from database!'
RemoveCmdNotFound: '&4[EMS] &cUser not found in the database!'
ReloadCmdWarning: '&cThis plugin does not recommend server reloads. If you have issues after running this command stop using it.'
PlayerNotFound: '&4[System] &cPlayer not found!'
PayAmountPositive: '&4[System] &cAmount must be positive!'
PayFormatError: '&4[System] &cAmount must be a number!'
PayNoMoney: '&4[System] &cYou do not have sufficient funds!'
PayComplete: '&2[System]&a $<amount> has been sent to&e <name>'
TakeComplete: '&2[System]&a $<amount> has been taken from&e <name>'
ResetComplete: '&2[System]&a Money reset complete for&e <name>'
BalanceCmd: '&2[System]&a Balance of&e <name>&a:&c $<amount>'
ReloadCmd: '&2[System]&a Config reload complete'
DatabaseTaskStart: '&6[System]&e Command will run in background for all players in database! Check console for progress...'
DatabaseTaskRunning: '&4[System]&c A database task is already running! Please wait until it''s done, check console for progress.'
HelpScreen:
- ' '
- ' &6&lEssentialsMysqlStorage Help'
- ' &7Get Money Top 10: '
- ' &e/ems baltop'
- ' &7Import Essentials data to database: '
- ' &e/ems import'
- ' &7Export Essentials data back to files: '
- ' &e/ems export'
- ' &7Kick all players and save their data: '
- ' &e/ems saveAndKick'
- ' &7Remove a user from the database '
- ' &e/ems remove <name>'
- ' &7Reload plugin config.'
- ' &e/ems reload'
- ' '

#Minecraft Color and Format Codes: http://minecraft.gamepedia.com/Formatting_codes

#Save and Kick command - disable kicking players after save if you want them moved to the fallback server when bungeecord is used
Kick-after-save: true
KickMessages:
saveAndKickCommand: '&cServer is restarting please come back in 20 seconds.'


Useful Info

[Essentials] Version mismatch! Please update EssentialsMysqlStorage to the same version.

Please ignore this log warning message. The reason Essentials posts this message is because this plugin hooks into essentials to sync data. Essentials thinks this is a module like EssentialsChat and posts that warning message to let you know it does not match the Essentials core version. This does nothing else.

Replace essentials /baltop with /ems baltop
You first need to disable essentials /baltop command, go to essentials config file and add the baltop command to the disabled commands like this:
disabled-commands:

- baltop
Then make a command alias for /ems baltop to /baltop , to do so go to the main server folder and add this to the commands.yml config file:
aliases:

baltop:
- ems baltop

Kit cooldown lost issues?
If you are still using old Essentials or Spigot-Essentials I recommend that you will update to EssentialsX as this is the updated and future of Essentials, it has fixes and is updated to work with latest spigot versions. If your kit cooldowns are not working after server restart update to EssentialsX but make sure it's the right version for your minecraft server version.

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 right before stopping the server 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 /ems saveAndKick it will save all data and kick all players for you in a safe way.


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 I will do it as fast as we get the new Minecraft version to keep the plugin running on all new versions.


Agreement
This plugin works as it is stated in the description.
If you are unsure if this plugin is for you, don't make a blind purchase!
Leave a comment or send me a pm to state your questions/concerns before buying!
By purchasing this plugin, you agree to the following terms:


  • All purchases are final.
  • You will not redistribute this plugin or any of its source code to anyone publicly or privately.
  • Absolutely no refunds.
  • You will not attempt to modify the this plugin source code without direct permission from me.

If you like this resource and want to say thank you with a donation please use this PayPal button. Thanks!
Buy a license now
$4.99
EULA: Standard EULA
Secure checkout:
Share and earn
Refer this resource and earn a 10% commission.
1,577 Views
6 Purchases
7 Downloads
Feb 10, 2021 Published
Jun 15, 2024 Updated
Not yet rated
206.6 KB File size
Type
  1. Economy
Game mode
  1. Survival
Supported software
  1. Bukkit
  2. Spigot
  3. Paper
Supported versions
  1. 1.7
  2. 1.8
  3. 1.9
  4. 1.10
  5. 1.11
  6. 1.12
  7. 1.13
  8. 1.14
  9. 1.15
  10. 1.16
  11. 1.17
  12. 1.18
  13. 1.19
Creator
Owner
Recommended for you
[1.5.2 - 1.21] Share players economy, inventory, enderchest, exp and more across servers.
5.00 star(s) 3 ratings
90 purchases
[1.6.4 - 1.20.2] A unique Halloween fancy set of effects.
Not yet rated
2 purchases
Prevents your server from crash packet exploits
5.00 star(s) 91 ratings
2,263 purchases
Elite formatting and filtering plugin. Can replace 200+ plugins. High-performance. Folia supported.
5.00 star(s) 108 ratings
2,118 purchases
All-in-one dungeon creator. Create unlimited, timed dungeon experiences with your own builds
4.50 star(s) 58 ratings
1,997 purchases
Share and earn
Refer this resource and earn a 10% commission.
1,577 Views
6 Purchases
7 Downloads
Feb 10, 2021 Published
Jun 15, 2024 Updated
Not yet rated
206.6 KB File size
Type
  1. Economy
Game mode
  1. Survival
Supported software
  1. Bukkit
  2. Spigot
  3. Paper
Supported versions
  1. 1.7
  2. 1.8
  3. 1.9
  4. 1.10
  5. 1.11
  6. 1.12
  7. 1.13
  8. 1.14
  9. 1.15
  10. 1.16
  11. 1.17
  12. 1.18
  13. 1.19
Creator
Owner
Recommended for you
[1.5.2 - 1.21] Share players economy, inventory, enderchest, exp and more across servers.
5.00 star(s) 3 ratings
90 purchases
[1.6.4 - 1.20.2] A unique Halloween fancy set of effects.
Not yet rated
2 purchases
Prevents your server from crash packet exploits
5.00 star(s) 91 ratings
2,263 purchases
Elite formatting and filtering plugin. Can replace 200+ plugins. High-performance. Folia supported.
5.00 star(s) 108 ratings
2,118 purchases
All-in-one dungeon creator. Create unlimited, timed dungeon experiences with your own builds
4.50 star(s) 58 ratings
1,997 purchases
Top