PlayTimes - Check players playtime & Server Uptime 1.4.5

The best /playtime plugin! PAPI support, offline checks, API & more!

  1. CodedRed
    Native Minecraft Version:
    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
    Source Code:

    PlayTimes is the perfect plugin for your server! Have players show off and compete for more time played with playtime's leaderboards! Not only can you check online/offline players playtime you can also check the uptime of the server! There is a lot coming to playtime such as PlayTime Rewards, PlayTime Ranks & PlayTime Shop!

    Playtime is great for players to check their playtime and more! Check your server uptime as well as use PAPI to check more important info!

    ⋯ Custom messages!
    ⋯ Check total time played on server!
    ⋯ Check offline players online playtime!
    ⋯ Check server uptime!
    PAPI support
    ⋯ Use JSON text!
    ⋯ Offline Server Support
    ⋯ Easy to config
    ⋯ Get players join date!
    ⋯ Check the top 10 players playtime! /toppt
    ⋯ Cooldown for /toppt
    ⋯ API
    ⋯ HEX Support

    Playtime has many custom placeholders!
    Code (Text):
    %player% - Get player's name.
    %time% - Get player's playtime.
    %timesjoined% - Get # of times player joined.
    %joindate% - Gets the date which the player has joined.
    %place% - Gets place in top leaderboard (only for /toppt)
    %player% - Gets player name (only for /toppt)
    %timeleft% - Gets time left in cooldown for /toppt

    How to use placeholders from PlayTime in other plugins:
    You must have this plugin downloaded and inside your plugins folder.
    The plugin automatically registers the placeholders.
    Code (Text):
    %PlayTimes_playtime% - returns player's playtime
    %PlayTimes_uptime%    - returns server uptime
    %PlayTimes_joindate%  - returns players joindate

    Leaderboard placeholders:
    %PlayTimes_topname1% - returns the #1 player with the most playtime (returns their name)
    %PlayTimes_toptime1% - returns the #1 time (player #1's time)

    You can go from 1 - 10 with this!
    Example) If you want the 3rd top playtime name and time do:
    %PlayTimes_topname3%  and %PlayTimes_toptime3%

    Complete list:

    You will only be able to use these placeholders in other plugins if they support PAPI!

    Want more placeholders?

    Feel free to dm me to request some to be added or check out the spolier below to learn how to use placeholders from other plugins in PlayTimes:
    How to use placeholders from PlaceHoldersAPI:
    1. Download placeholderapi
    2. Download the placeholders, /papi ecloud download <name>
    3. Reload papi, /papi reload
    4. Make sure to have use-papi-placeholders: true in the config.yml!

    5. Reload PlayTimes
    6. Use the placeholders in PlayTime!

    Code (Text):
    /playtime <player>
    /playtime block <player> - blocks player from being on the leaderboards
    /playtime unblock<player> - unblocks player from leaderboards
    /playtime top - /toppt shortcut
    /playtime reload
    Playtime aliases: /playerinfo, /playt, /pt
    Uptime aliases: /serveruptime, /serverupt
    TopPlayTime aliases: /toppt

    NOTE: /pte was removed, may return soon.

    Code (Text):
    pt.use - Lets you use /playtime.
    pt.others - Lets you check others playtime.
    pt.uptime - Lets you check server uptime.
    pt.reload - Lets you reload & more.
    pt.block - Lets you block players from being on the leaderboard - Lets you use /toppt
    pt.block-cooldown - No cooldown for /toppt


    Code (YAML):
    # PlayTimes by CodedRed
    # For support please ask here:

    # Prefix will show before 'player-not-found' & 'player-never-joined' messages
    : "&7[&b&lPlayTimes&7]"

    # date-format can be changed to your liking.
    # For more placeholders look here:
    # This is the join date format.
    : MM/dd/yyyy

    # Placeholders API info
      # Only enable this if you are using PAPI holders in PlayTimes
      # If you want to use PlayTimes placeholders in other plugins...
      # Just download PAPI and it will *automatically* register
    : false

    # Main Playtimes info.
    # The name refers to the format. Example if you have minute = " min" then it will display "x min"
    : "s"
    : "min"
    : "hr"
    : "day"
    : "s"
    : "mins"
    : "hrs"
    : "days"

      ## only-hours - when true it will display playtime in hours (When true this will also disable show-seconds/days setting)
      ## show-seconds - when true it will display seconds
      ## show-days - when true it will display days
    : false
    : true
    : true

      ## Built-in Placeholders:
      ## %player% %time% %timesjoined% %joindate%
      ## You may also use PAPI Placeholders
       - "&b&m=======&b&l[%player%]&b&m======="
        - "&aPlaytime:&f %time%"
        - "&aTimes joined:&f %timesjoined%"
        - "&aJoined Date:&f %joindate%"
        - "&b&m============================"

    # /Uptime command info - only placeholder is %serveruptime%
       - "&b&m============================"
        - "&aServer Uptime:&f %serveruptime%"
        - "&b&m============================"

    # /toppt command info
    ## Built-in Placeholders:
    ## %player% %place% %time% %joindate%
    ## You may also use PAPI placeholders
    : "&b******&9[&3&lPlayTime Leaderboards&9]&b*****"
    : "&5%place%) &9&l%player% &9&o- %time%"
    : "&b****************************************"
    : true
    : 60

    # Built in messages, may change to your liking :D
    : "&cYou cannot run this command."
    : "&cPlayer not found."
    : "&cPlayer has never joined the server!"
    : "&cYou cannot use this command for %timeleft% seconds!"

    For Hex Color codes use <#123456> format!

    JSON tellraw text lets you make custom chat messages that could include hoverable text, suggest command, link, colors, styles, and more!
    For help with JSON chat check out the link below!
    JSON Wiki Help

    REMEMBER! When writing this info into the config file you must add a backward slash(\) before the quotes. Example below:
    Code (Text):
       - " {\"text\":\"Website\",\"bold\":true,\"color\":\"green\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"Visit our Website!\"}}"

    The API for this plugin has been greatly redone. First, start off by adding this resource to your plugin.

    **BIG API Changes are on the way.**(Check out update 1.4)
    Once this plugin is added to your projects' external libraries you can start to use it!

    The API works from two different methods.

    A TimelessPlayer and a TimelessServer.


    A TimelessPlayer can either be online or offline.
    Example: Creating an online player:
    Code (Java):
    TimelessPlayer player = new TimelessPlayer(event.getPlayer());
    *If the player is offline or unknown use a UUID instead of a Player!
    Example: Creating an offline player:
    Code (Java):
    TimelessPlayer player = new TimelessPlayer(uuid);
    A Timeless player has the following methods:

    Code (Text):
    getPlayTime() - returns playtime of player in format


    A TimelessServer can display the top 10 leaderboard info and uptime!

    To create a TimelessServer simply do:
    Code (Java):
    TimelessServer server = new TimelessServer();
    The methods a TimelessServer can do are:

    Code (Text):
    getTop10Players() - returns top 10 players in a list
    getNumberOne() - returns number 1 in leaderboard
    getNumberTwo() - returns number 2
    getNumberThree()... all the way to getNumberTen()

    getUptime() - returns server uptime in format
    getUptimeInSeconds() - returns uptime in seconds
    NOTE: It is recommended to use getTop10Players() and retrieving the other positions when dealing with multiple positions.

    For further help join the help discord :)
    P.S old API works but will be removed in 2-3 updates!

    (NOTE: You will only need to do this in old versions of MC)
    How to update player time faster:
    If the players playtime isn't updating every second you will have to go into your bukkit.yml folder on your server and change ticks-per: autosave: to 20.
    NOTE: This may cause more lag, recommend to keep at default or close to it!
    Code (Text):
      animal-spawns: 400
      monster-spawns: 1
      autosave: 20

    (located in bukkit.yml folder)


    If you are experiencing an issue go here!
    Need help? First, check out the wiki!

    Your world folder *must* contain a stats folder for PlayTimes to work. PlayTimes does not record your player time but rather displays the data from the world's stat folder. If you do not have a Stats folder check your spigot.yml and make sure the "stats" section has "disable-saving" as false!

    Stats for PlayTimes is located here:

    [​IMG] [​IMG]
    The plugin doesn't work the way you want it to? Message me through discord, spigot, or on the discussion page before you leave a review. Leaving a review with error messages does not make me work any harder to solve the issue.​

    belisarius, Pekay, KaiRenXVN and 5 others like this.

Recent Updates

  1. Update 1.4.5
  2. Timings Fix
  3. Bug Fixes & New Threading

Recent Reviews

  1. Ghostaunt.TV
    Version: 1.4.4
    1. CodedRed
      Author's Response
      Looks like an error with something you inputted into the config.yml. Please dm me for further help!
  2. LukeAtomic
    Version: 1.4.4
    This plugin is great!, everything works brilliant, placeholders actually works, for some reason some other plugins they dont work. So im very happy they work. 100% recommend using this plugin.
  3. Mythologyli
    Version: 1.3.10
    Thanks for your great work!
    In spigot 1.17, when I used the toppt command, I got this error:

    Unexpected exception while parsing console command "toppt"
    >org.bukkit.command.CommandException: Unhandled exception executing command 'toppt' in plugin Playtimes v1.3.10
    at org.bukkit.command.PluginCommand.execute( ~[spigot.jar:3118-Spigot-66f9d3c-27835bd]
    at org.bukkit.command.SimpleCommandMap.dispatch( ~[spigot.jar:3118-Spigot-66f9d3c-27835bd]
    at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchCommand( ~[spigot.jar:3118-Spigot-66f9d3c-27835bd]
    at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchServerCommand( ~[spigot.jar:3118-Spigot-66f9d3c-27835bd]
    at net.minecraft.server.dedicated.DedicatedServer.handleCommandQueue( ~[spigot.jar:3118-Spigot-66f9d3c-27835bd]
    at net.minecraft.server.dedicated.DedicatedServer.b( ~[spigot.jar:3118-Spigot-66f9d3c-27835bd]
    at net.minecraft.server.MinecraftServer.a( ~[spigot.jar:3118-Spigot-66f9d3c-27835bd]
    at net.minecraft.server.MinecraftServer.x( ~[spigot.jar:3118-Spigot-66f9d3c-27835bd]
    at net.minecraft.server.MinecraftServer.lambda$0( ~[spigot.jar:3118-Spigot-66f9d3c-27835bd]
    at [?:?]
    >Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "org.json.simple.JSONObject.get(Object)" is null
    at me.codedred.playtimes.utils.Statistics.getPlayerStatistic( ~[?:?]
    at me.codedred.playtimes.models.Leaderboard.updateTimes( ~[?:?]
    at me.codedred.playtimes.models.Leaderboard.getTopTen( ~[?:?]
    at me.codedred.playtimes.commands.TopTime.onCommand( ~[?:?]
    at org.bukkit.command.PluginCommand.execute( ~[spigot.jar:3118-Spigot-66f9d3c-27835bd]
    ... 9 more
    1. CodedRed
      Author's Response
      Thanks for the review! Plugin has been updated to 1.17, this error should be gone for you now :)
  4. 2580crq
    Version: 1.3.10
    The following prompt appears:
    [08:01:28 WARN]: Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!
    [08:01:34 WARN]: Legacy plugin Playtimes v1.3.10 does not specify an api-version.
    1. CodedRed
      Author's Response
      Do not worry about this warning, I will look to change it soon. Thank you for the review!
  5. fabsi2aYT
    Version: 1.3.10
    Very Cool, but can you add Mysql support? I need it for my Server. You could also add to change the reflesh in ticks for the playtime in the config.
    1. CodedRed
      Author's Response
      Thanks for the review, MySQL support is coming. PlayTimes does not count time at all, the time is counted by the server. To configure the refresh time you must change your autosave time.
  6. NylaOnYoutube
    Version: 1.3.10
    Nice plugin, but can you add placeholders in sek, hours, min?
    would be really better.
    1. CodedRed
      Author's Response
      The placeholder system is being looked into, check out the current PAPI placeholders for a bit more configurability. Thank you!
  7. FireRoz
    Version: 1.3.10
    Would love to see support for GUIs.
    A red wool would be how many times the player has logged on, the lore would be the value. (Total logins: 1000)
    1. CodedRed
      Author's Response
      Thanks for the review!
      I looked into adding a GUI before, maybe I'll take another look into adding one. Thanks again!
  8. BandaiBoys
    Version: 1.3.10
    Looks like a good plugin, however, does playtime freeze when you're afk? (Like the essentials plugin)
    1. CodedRed
      Author's Response
      No PlayTimes only reads the time-played (time online). I suggest getting a good afk kicker or waiting for my premium version of PlayTimes coming soon.
  9. 1HarryH
    Version: 1.3.10
    It works on 1.16.4 Paper :) very nice and easy configurable Plugin :)
    Top work !
    1. CodedRed
      Author's Response
      Appreciate the review! Thank you.
  10. ZamanPvpNetwork
    Version: 1.3.8
    [07:55:49 INFO]: Loaded plugin cmd_list version git:cmd_list:1.16-R0.4-SNAPSHOT:52a5c6f:371 by WaterfallMC
    [07:55:49 WARN]: Error enabling plugin Playtimes
    java.lang.NoClassDefFoundError: org/bukkit/plugin/java/JavaPlugin
    at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_211]
    at java.lang.ClassLoader.defineClass(Unknown Source) ~[?:1.8.0_211]
    at Source) ~[?:1.8.0_211]
    at Source) ~[?:1.8.0_211]
    at$100(Unknown Source) ~[?:1.8.0_211]
    at$ Source) ~[?:1.8.0_211]
    at$ Source) ~[?:1.8.0_211]
    at Method) ~[?:1.8.0_211]
    at Source) ~[?:1.8.0_211]
    at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_211]
    at net.md_5.bungee.api.plugin.PluginClassloader.loadClass0( ~[Waterfall.jar:git:Waterfall-Bootstrap:1.16-R0.4-SNAPSHOT:52a5c6f:371]
    at net.md_5.bungee.api.plugin.PluginClassloader.loadClass( ~[Waterfall.jar:git:Waterfall-Bootstrap:1.16-R0.4-SNAPSHOT:52a5c6f:371]
    at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_211]
    at net.md_5.bungee.api.plugin.PluginManager.enablePlugin( ~[Waterfall.jar:git:Waterfall-Bootstrap:1.16-R0.4-SNAPSHOT:52a5c6f:371]
    at net.md_5.bungee.api.plugin.PluginManager.loadPlugins( ~[Waterfall.jar:git:Waterfall-Bootstrap:1.16-R0.4-SNAPSHOT:52a5c6f:371]
    at net.md_5.bungee.BungeeCord.start( ~[Waterfall.jar:git:Waterfall-Bootstrap:1.16-R0.4-SNAPSHOT:52a5c6f:371]
    at net.md_5.bungee.BungeeCordLauncher.main( ~[Waterfall.jar:git:Waterfall-Bootstrap:1.16-R0.4-SNAPSHOT:52a5c6f:371]
    at net.md_5.bungee.Bootstrap.main( ~[Waterfall.jar:git:Waterfall-Bootstrap:1.16-R0.4-SNAPSHOT:52a5c6f:371]
    Caused by: java.lang.ClassNotFoundException:
    at net.md_5.bungee.api.plugin.PluginClassloader.loadClass0( ~[Waterfall.jar:git:Waterfall-Bootstrap:1.16-R0.4-SNAPSHOT:52a5c6f:371]
    at net.md_5.bungee.api.plugin.PluginClassloader.loadClass( ~[Waterfall.jar:git:Waterfall-Bootstrap:1.16-R0.4-SNAPSHOT:52a5c6f:371]
    at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_211]
    ... 18 more
    [07:55:49 INFO]: Enabled plugin reconnect_yaml version git:reconnect_yaml:1.16-R0.4-SNAPSHOT:52a5c6f:371 by WaterfallMC
    [07:55:49 INFO]: Enabled plugin cmd_find version git:cmd_find:1.16-R0.4-SNAPSHOT:52a5c6f:371 by WaterfallMC
    [07:55:49 INFO]: Enabled plugin SkinsRestorer version 13.4-SNAPSHOT by Th3Tr0LLeR, DoNotSpamPls, Blackfire62
    1. CodedRed
      Author's Response