PublicPlaytime 1.2
PublicPlaytime is a plugin which makes it easy to see playtimes of every player who has ever been on your server. PublicPlaytime uses the standard Statistic from Bukkit* to query the playtime of online players, and a database which holds the time for all offline players. The time played is of course how long a certain player has been logged in on your server. It should be the same as the statistic in vanilla Minecraft that people can access via the statistics menu. This also means, that when you switch the main world of your server, the playtime will be reset. To prevent this from happening, use the backup feature that is explained further below.
*Any forks of Bukkit will suffice (i.e. Spigot, Paper etc.)
Commands
PublicPlaytime has several functions. All commands can be seen in-game via /playtime help, aliases can also be found here.
- /playtime get <player> <outputMode>
- Gets the playtime for that specific player in a certain format
- <outputMode> - days, hours, minutes, seconds, ticks, standard
- standard will output the playtime in DD:HH:MM:SS format.
- <outputMode> - days, hours, minutes, seconds, ticks, standard
- Gets the playtime for that specific player in a certain format
- /playtime ranking <outputMode> <maxAmount>
- Outputs a leaderboard of playtime in your chat in standard formatting.
- <maxAmount> - any integer
- The amount of places that the printed leaderboard will hold. I.e. 5 will get you the top 5 players.
- <outputMode> - days, hours, minutes, seconds, ticks, standard
- standard will output the playtime in DD:HH:MM:SS format.
- <maxAmount> - any integer
- Outputs a leaderboard of playtime in your chat in standard formatting.
- /playtime scoreboard <show/hide> <outputMode> <maxAmount>
- Shows or hides a scoreboard of the players with the highest amount of playtime.
- <show/hide> 'show' or 'hide'
- Whether to show or hide a scoreboard.
- <maxAmount> - any integer
- The amount of places that the printed leaderboard will hold. I.e. 5 will get you the top 5 players.
- <outputMode> - days, hours, minutes, seconds, ticks
- standard is not permitted here, you can guess why.
- <show/hide> 'show' or 'hide'
- Shows or hides a scoreboard of the players with the highest amount of playtime.
Output when executing: /playtime scoreboard show minutes 10
- /playtime help
- Shows a list of all commands that the plugin has.
- /playtime about
- Shows information about the plugin, where to find it and more.
- /playtime backup
- Saves the current playtimes into a file. This will overwrite a previous backup.
- /playtime load
- Loads playtimes from the backup file, and sets all playtimes equal to those of the backup. This will overwrite old playtimes. This feature is handy when transferring main worlds, as this resets playtimes. To carry the playtimes over, backup the old playtimes in the old world, change worlds, then load them.
Upon first starting the plugin, 2 YAML files will be created, a config and a database. The config will hold options for the plugin for you to edit. There are 2 settings that can be changed, whether to allow scoreboards to refresh, and if so, at what interval they should do so. Anything below 20 ticks (1 second) will not have an effect, since the statistics themselves are done with seconds.
The database is not to be edited. It stores playtimes as ticks per player. You can add players, although this is already done by the plugin when people first join, and any values will get overwritten when a player quits the server.
A backup file is present if a backup is made with /playtime backup. You may edit this file (although I dicourage you from doing it) but notice that when you do this, to load the backup file, first reload/restart the server for the plugin to see the manual changes you've made.
Upcoming feature(s) (hopefully)
- PlaceholderAPI support
See Github Issues.
If there are any problems create a message below, add them on GitHub, here, or DM me on Twitter. You may also join the Discord Support server.
Thanks!
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.19, 1.20
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
PublicPlaytime is a free Minecraft Java mod. Compatible with Minecraft 1.19, 1.20. Downloaded 755 times (via Spigot). Download it and open it directly in the game.