PlayTimeRewards 2.2.0

Reward players for hours of play & daily joins!

  1. D4n13lH
    This plugin is no longer in development. If you would like to continue it, message me and I'll provide the source code.

    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)


    Installation
    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
    Changelog
    http://www.spigotmc.org/resources/playtimerewards.2463/updates

    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. bennajah
    bennajah
    5/5,
    Version: 2.2.0
    good plugin

    please add Mysql
    i use BungeeCord

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

    - Check others playtime
    - /playtime top
  3. Sam1370
    Sam1370
    4/5,
    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
  4. Karl_Contreras
    Karl_Contreras
    4/5,
    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"
  5. Benzix
    Benzix
    5/5,
    Version: 2.2.0
    Amazing Daily reward plugin! I love it. It's absolutely amazing, I use it on my server (benzixnetwork.mcpro.co) 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.
  6. FireControl1847
    FireControl1847
    5/5,
    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!
  7. Classic36
    Classic36
    5/5,
    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
  8. Durklas
    Durklas
    5/5,
    Version: 2.2.0
    9/10
    You must add:
    1.Playtime top scoreboard
    2.Allow to check others playtime
    Plugin looks great:)
    Recommend to everyone!
  9. DfieldJr
    DfieldJr
    5/5,
    Version: 2.2.0
    5 STARTS! ITS AMAZING!
    Expect the config can be confusing?
    Whats 'randomHourOfPlayCommand'
    They need to be more clear or have a description near them on what they do.

    Also I cannot wait for leaderboards, I can already see competitions on who will be on top.
    <3
  10. _Zane
    _Zane
    5/5,
    Version: 2.2.0
    Great plugin, fits perfectly to whatever needs! Right now I am using it for an advent calendar, it's so much fun for both the players and staffs! Check it out on my server if you'd like: Mc.chargedminecraft.com