= Referred By =
>(Added in OnTime V3.0 0)
With the 'referred by' extension to //OnTime//, players can be rewarded for referring their friends to the server, but they will only receive the reward after the new player has been on the server for a configurable amount of time.
\\
\\
The configuration and setup of the feature gives the administrator the ability to reward groups of players differently, for example a reward for a referral by a server donor can be greater than the reward issued to just some average player.  Rewards can also be set up in tiers so a minimal reward can be given right away for a referral, but then a larger reward issued after the new player has been on for much longer. //(a 'reward set')//
\\
\\
Only one recommendation reward set will be issued per new player, but a player can be credited for making any number of referrals.  A player can never refer themselves.
\\
== Setup ==
=== Permissions ===
In order to make and receive 'referred by' rewards a player or group must have the 'ontime.referredby.enable' permission.
=== Configuration (/ontime/config.yml) ===
In order for the 'referred by' functions to be active on the server, it must be enabled:
>referredByEnable: true
\\
To prevent long time players from suddenly claiming they were referred by someone else, a max time can be set, such that if the player has more than that many hours played on the server, a 'recommended by' request will be denied.  Setting this parameter to -1 will disable the function, and all players can claim they were referred.
>referredByMaxTime: -1

=== Reward Setup ===
==== Add Rewards ====
>Example
1. Create a reward to be issued once the player has been on for one hour, of 100 Coins
>/ontime rewards add econ 0 1 0 100
2. Make that reward a referral reward
>/ontime rewards refer 1 (This last number is the rewardID. Since we only have one reward defined, it is #1)
3. Create a second reward of 20 diamonds, to only be issued to the 'donor' permission group, but only after the new player has been on for 1 day.
>/ontime rewards add item 1 0 0 20 diamonds

>/ontime rewards refer 2

>/ontime rewards exclusive 2 donor (See the rewards page for more info about 'exclusive' rewards.)

=== Making it Happen ===
When the new player joins the server, they simply need to execute the 'referred by' command.
>Example:

>Assuming that I'm the one that made the reference:
\\
>/referred by Edge209  
>>(Note that this command does **NOT** start with //ontime//.)
\\
>In the example above, I would receive 100 coins after the player that executed the 'referred by' command has been on the server for 1 hour.  If I am a member of the 'donor' group on the server, I will receive an additional 20 Diamonds after that same player has been on the server for 1 days worth of playtime.  If I am on the server at the time that the player achieves these playtime levels I will get the rewards immediately.  If I am not on the server at that time, I will get the reward(s) shortly after I next login to the server.
\\

=== Behind the Scenes ===
* After a new player has issued the 'referred by' command, 'referred by' rewards will be scheduled for that player.  So if you execute the '/ontime <playerName>' command for that new player, you will see listed for them these rewards.  This does not mean they will receive the reward, but the plugin is using the same mechanism to track their playing time to know when to issue the reward later to the referring player.  Once the new player reaches the target playing time, a reward will then be scheduled for the referring player, and would show up for that player when '/ontime <playerName>' is executed.
* Once a new player has been 'successfully referred' by another player, meaning the referring player has received at least one reward, the new player will be given the 'permission string' of 'ontime.referredby.success'.  This string will appear in the permission plugin's configuration for that new player.  It is this permission sting that prevents the player from issuing additional 'referred by' commands.