PlayTimeRewards 2.2.0

Reward players for hours of play & daily joins!

  1. D4n13lH
    This plugin is no longer in development.

    This plugin was requested by @adamwbb

    This is my most popular plugin so far :)

    How to use

    Once you've loaded the plugin at least once, open up the config. In there you can edit whether permissions are used, the commands to run on daily join and hour of play and the delay between online-time rewards. To check your total playtime, do /playtime or /myplay.

    Note: hour of play is total play time, not current session length

    Permissions (must be enabled in config!)
    • playtimerewards.dailyJoinReward - Allows the player to receive the daily join reward (given by default, unless you use PEX as it ignores defaults)
    • playtimerewards.hourOfPlayReward - Allows the player to receive the hour of play reward (also given by default, unless you use PEX as it ignores defaults)
    • playtimerewards.checkPlaytime - Allows the player to check their total playtime with /playtime or /myplay (also given by default, unless you use PEX as it ignores defaults)

    1. Download the plugin
    2. Place playtimerewards VX.X.X.jar in your plugin folder
    3. Restart/reload your server or use a plugin loader to enable playtimerewards
    4. Configure the config to do what you want it to.
    5. Restart/reload your server or use a plugin loader to reload playtimerewards

    Video Tutorial by NumeroUno (Slightly Outdated)

    Planned features

    • Leaderboards
    • Add a command to edit all config options in game (possibly)
    • Non-UUID option for older versions (possibly)
    • Add support for checking the playtime of others with /playtime
    • A command you can add that messages the player without [CONSOLE -> me]
    • Add a broadcast command to use without the [Server] prefix
    • Bungee-cord support
    • Delay before daily rewards
    Known Bugs (report in discussion) (not updated very often)
    • A few crashes I'll look into soon

    Config Guide

    If you
    configVersion: 1 ||| DO NOT to change this||

    hourOfPlayDelayMinutes: 60 ||| The amount of time IN MINUTES it takes to get given the playtime reward ||

    usePermissions: false |||Whether players require permission to receive the rewards ||

    randomDailyJoinCommandsToRun: 1 |||How many of the random reward commands to run when the player joins for the first time that day
    randomHourOfPlayCommandsToRun: 1 |||Same as previous but for the playtime reward ||

    dailyJoinCommand: |||The reward commands to be run when a player logs in for the first time in a day ||
    - 'tell %player% &dHi!'- 'say &b%player%&a has joined for the first time today!'- 'say add as many more commands as you want in this bit!'

    randomDailyJoinCommand: |||The random commands to choose from||
    - 'tell %player% &aRandom 1'- 'tell %player% &bRandom 2'- 'say add as many more commands here as you want!'- 'say set it to run a custom amount of theese with the randomDailyJoinCommandsToRun variable!'

    hourOfPlayCommand: |||Same as dailyJoinCommand but for the playtime reward||
    - 'tell %player% &dHi!'- 'say &b%player%&a has just reached another hour of total play time!'- 'say You may want to edit the command above this if you edit the delay!'- 'say add as many more commands as you want in this bit!'

    randomHourOfPlayCommand: |||Same as randomDailyJoinCommand but for the playtime reward||
    - 'tell %player% &aRandom 1'- 'tell %player% &bRandom 2'- 'say add as many more commands here as you want!'- 'say set it to run a custom amount of theese with the randomHourOfPlayCommandsToRun variable!'

    How to use the API (ptr 2.2.0+)

    To use the api you need to first add the following line to your plugin.yml:

    Then you need to add your playtimerewards jar as a dependency the same way you did with the bukkit jar (unless you used maven, in which case you go into the dependencies area of project structure for intellij, although I'm not quite sure how this is done in Eclipse, it'd be if someone could tell me so I could put it here :D).

    After that you need to access the instance of the plugin by using the following line of code:
    PlayTimeRewardsRecoded PTRR = PlayTimeRewardsRecoded.Instance;
    (The PTRR can be renamed to whatever you like, just be sure to change it everywhere else you use it!)

    Then you can get a player's playtime and last login by passing their UUID into the following functions
    PTRR.PTRgetPlaytime(PlayerUUID) - returns a long (format is year/month/day)
    PTRR.PTRgetLastLogin(PlayerUUID) - returns a string

    Btw once I release the leaderboards function they will be gettable from the API.

    Additional info

    If you need help just ask in the discussion section!

    PlayTimeRewards should work fine with all versions as it contains no version dependent code, but may break with some versions.

    Be sure to check out my other resources!
    Tyrelis, Tennant, ahfudo and 8 others like this.

Recent Updates

  1. The API
  2. 2.1.4
  3. 2.1.3 (Urgent for some)

Recent Reviews

  1. Rad_wolf
    Version: 2.2.0
    I got The plugin But when I do /playtime it always says 0days 0hours 0 minutes Is The plugin not working anymore or what?
  2. SanderSyptix
    Version: 2.2.0
    i got this in console
    >.... [02:18:16 ERROR]: Could not pass event PlayerLoginEvent to PlayTimeRewardsRecoded v2.2.0
    how do i fix this
  3. MartyJons
    Version: 2.2.0
    Excellent! This resource is amazing! I like it very much! .............................................................................
  4. bennajah
    Version: 2.2.0
    good plugin

    please add Mysql
    i use BungeeCord

  5. Chessnut
    Version: 2.2.0
    Amazing plugin! Just like Sam1370, a few suggestions - PLEASE ADD!

    - Check others playtime
    - /playtime top
  6. Sam1370
    Version: 2.2.0
    Good, but a few suggestions (some mentioned by others in this thread)
    - Config reload
    - Check others playtime
    - Bug for me: randomHourOfPlay command creates an error and the command doesn't run
  7. Karl_Contreras
    Version: 2.2.0
    Nice plugin, i hope you can add config reload too and update the plugin soon as you've said like the thing with [Console]->me or [Server] when you use "say"
  8. Benzix
    Version: 2.2.0
    Amazing Daily reward plugin! I love it. It's absolutely amazing, I use it on my server ( and it works like a charm! the config is very easy to use and is very nice and simple! It also works amazing with PEX.
  9. FireControl1847
    Version: 2.2.0
    This is the best plugin ever, and I can't wait until it gets moved over. A command to Reload the plugin/config from the console/op's would be nice though. Other than that, I can't wait for the new updates to come! I give this five stars because of the way it's been working!
  10. Classic36
    Version: 2.2.0
    This plugin is very useful for tracking how long players spent on my server as well as giving them rewards for spending time online. I love it :D