PlayTimeRewards 2.2.0

This plugin is no longer in development.
This plugin was requested by @adamwbb

This is my most popular plugin so far
How to useOnce 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

Download the plugin

Place playtimerewards VX.X.X.jar in your plugin folder

Restart/reload your server or use a plugin loader to enable playtimerewards

Configure the config to do what you want it to.

Restart/reload your server or use a plugin loader to reload playtimerewards

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 ).

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 infoIf 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.

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.

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!