This is a discussion topic for the Ore project, PlayTimeCounter. View the full project on Ore for downloads and more information.
PlayTimeCounter
Sponge plugin that counts players’ playtime. At the moment, it works only with MySQL!
Setup
First of all you should set SQL alias in config/sponge/global.conf. Open it and find section “aliases” in section “sql”.
Set the alias in the following format: alias_name"="jdbc:mysql://username:password@host/database_name.
Drop .jar file into the mods folder.
Restart the server.
Configure plugin configuration file and reload it by the command “/sponge plugins reload”.
Commands and perms
/playtimecounter [playerName] - Displays playerName’s playing time. If argument isn’t specified, displays playing time of command sender.
Aliases: /playtime, /ptc
Permissions:
playtimecounter.cmd.playtime.base - Giving access to the command
playtimecounter.cmd.playtime.others - Giving possibility to see playing time of other player
/playtimetop - Displays top by playing time.
Aliases: /topplaytime, /ptctop
Permission: playtimecounter.cmd.playtimetop.base
/ptcreload - Reloads configuration file.
Permission: playtimecounter.cmd.reload.base
Feedback
If you face any problems, feel free to create an issue at the GitHub repository: click. Thank you.
A new version has been released for PlayTimeCounter, it is available for download here.
PlayTimeCounter
Sponge plugin that counts players’ playtime.
Setup
Plugin tested with SQLite and MySQL, but may be it works with something another.
First of all you should set SQL alias in config/sponge/global.conf. Open it and find section “aliases” in section “sql”.
If you want to use MySQL, set alias in that format: “alias_name”=“jdbc:mysql://username:password@host/database_name”.
If you want to use SQLite, set alias in that format: “alias_name”=“jdbc:sqlite:path_to_file.db”.
Drop .jar file into the mods folder.
Restart the server.
Configure plugin configuration file and reload it by the command “/sponge plugins reload”.
Commands and perms
/playtimecounter [playerName] - Displays playerName’s playing time. If argument isn’t specified, displays playing time of command sender.
Aliases: /playtime, /ptc
Permissions:
playtimecounter.cmd.playtime.base - Giving access to the command
playtimecounter.cmd.playtime.others - Giving possibility to see playing time of other player
A new version has been released for PlayTimeCounter, it is available for download here.
Added command /playtime [playerName], displaying playing time of the player.
Aliases: /playtimecounter, /ptc
Perms: playtimecounter.cmd.playtime.base - Giving access to the command playtimecounter.cmd.playtime.others - Giving access to view other’s playtime
Now plugin will count player’s playtime only if he isn’t afk (disabled as default, can be enabled in config file(requires Nucleus))
For new players their ‘time played’ is taken from statistic. (btw If countAFKTime = true for players that already exists in database their ‘time played’ will taken from statistic too instead of increment (idk why did i do it so maybe it will be removed)
Hey! author.
Sorry i didn’t describe clearly.
my mean is: Hope you can make a papi, such as %player_playtime% (is can show player’s playtime).
and i want to use this papi to Virtual Chest.
So i can give player some moeny and prise .
Unfortunately, for now I don’t know how to implement functionality that you have described. But I can implement another thing: some kind of reward system. When some player reaches N minutes of playing time, the command which you will specify in the config will be invoked (using this you can reward your players with items/money/etc. for playing time). I guess it solves your problem.
Я так понимаю что часы в игре это по нашему минуты верно? я просто не пойму как оно работает, на сайте через вывод playtime через data() функцию php выдает 6 минут 45 секунд (405)