PlayTimeMySQL is a plugin made to store player playtime data on your Minecraft Server. This plugin only currently supports 1.13+. I have no intentions of making it pre-1.13 unless people really want it (The main factor here is that CodedRed's PlayTimes does not work that well with pre-1.13 servers).
- Native Minecraft Version:
- Tested Minecraft Versions:
What does it do?:
The plugin stores playtime data using CodedRed's PlayTimes into a MySQL database (that you own and host yourself) for each day and each player. It only stores data if the player has:
If a server restarts for any reason, players need to join the server again to get their data checked. This is to avoid creating server lag. If you have 100 concurrent players on your server, it will create issues if it constantly checks all players, all the time.
- Played on the server during its current session.
- PlayTimes by CodedRed
- Download the plugin.
- Put it into your "plugin" folder.
- Restart your server to generate configuration files.
- Go to the "PlayTimeMySQL" folder, then to "config.yml".
- For step 5, you will need to make sure you set ALL config fields to suit your timezone/database.
- Go to the console for your database, and create a table with the fields "date", "name", "uuid", "time", "secs"; (CREATE TABLE table_name (date TEXT(1000), name TEXT(1000), uuid TEXT(1000), time TEXT(1000), secs TEXT(1000))).
- Save your config.yml file (after all options are set to suit your timezone/database), and restart your server.
- The system is now active! You can use a discord bot (you will need to self-host) and discord console (Using DiscordSRV) to be able to achieve this. I am willing to share my source code for a command that fetches playtime data if you join my discord server.