Essentials MySQL Storage Extension

 Essentials MySQL Storage Extension 1.25.0

Essentials MySQL Storage Extension
◦•●❤♡ ᴄᴏɴᴛᴀᴄᴛ Dekomori on discord ꜰᴏʀ ꜱᴜᴘᴘᴏʀᴛ ♡❤●•◦

Native Minecraft Version:
1.13
Tested Minecraft Versions: 1.7 / 1.8 / 1.9 / 1.10 / 1.11 / 1.12 / 1.13 / 1.14 / 1.15 / 1.16 / 1.17 / 1.18
Source Code: https://github.com/brunyman/Essentials-MySQL-Storage-Extension/issues

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.


Please note! All this plugin does is copy the Essentials players data on the database and back, if you sync more servers and servers are different like different worlds or kits Essentials will remove data that is invalid. For example, if you copy user data from server A where the user saved his home in a world that does not exist in server B Essentials will remove that sethome location. This plugin does not change how essentials work you can test out without this plugin by manually copy the data file to the other server.


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 ChestShopplugin for offline sales and buy orders.
  • Support for AuctionHouse plugin for offline auctions.
  • Support for PlayerShopGUI+ plugin for offline sales.
  • Support for ShopChestplugin 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.

Latest updates

  1. 1.25.0

    1.25.0
  2. 1.22.4

    1.22.4
  3. 1.22.3

    1.22.3

Latest reviews

Update pls.

Similar resources

Essentials MySQL Storage Extension CommunistPandaX
5.00 star(s) 4 ratings
Downloads
530
Updated
Essentials MySQL Storage Extension Blurs
2.00 star(s) 1 ratings
Downloads
394
Updated
Essentials MySQL Storage Extension FireLeaker
[1.7.10 - 1.12] Adds MySQL database storage to the popular Essentials plugin.
2.33 star(s) 3 ratings
Downloads
597
Updated
BlackSpigot General Chat
Rules Help Users
    N @ NabixEnd: hi
    Top