Working with Playtime Rewards

I was able to get this to work with Play Time Rewards by doing the following.  Bold text in code changes indicate what code was changed.  Requires editing PlayTimeRankings.cs as well as PlayerRankings.cs

Part 1.

Edit PlayerRankings.cs in Notepad or Notepad++.

Change the following line of code:
[PluginReference]
Plugin ConnectionDB, PlaytimeTracker, BetterChat;

Update the above line of code with the following
[PluginReference]
Plugin ConnectionDB, PlaytimeTracker, PlayTimeRewards, BetterChat;

Scroll down unil you find this next piece of code
double GetPlayTime(BasePlayer player)

GetPlayTime, in software development is called a method.  Your going to replace the GetPlayTime method with what I'm showing below as the new version of GetPlayTime...

Old Version of GetPlayTime
double GetPlayTime(BasePlayer player)
{
double playTime;
if (PlaytimeTracker)
{
playTime = Convert.ToDouble(PlaytimeTracker.Call("GetPlayTime", player.UserIDString)) / 60 / 60;
return playTime;
}
if (ConnectionDB)
{
playTime = ConnectionDB.Call<uint>("API_GetSecondsPlayed", player.userID) / 60 / 60;
return playTime;
}
Puts("There is no plugin tracking the playtime for players");
return 0f;
}

New Version of GetPlayTime
double GetPlayTime(BasePlayer player)
{
double playTime;
if (PlayTimeRewards)
{
playTime = Convert.ToDouble(PlayTimeRewards.Call("FetchPlayTime", player.UserIDString)) / 60 / 60;
return playTime;
}
if (PlaytimeTracker)
{
playTime = Convert.ToDouble(PlaytimeTracker.Call("GetPlayTime", player.UserIDString)) / 60 / 60;
return playTime;
}
if (ConnectionDB)
{
playTime = ConnectionDB.Call<uint>("API_GetSecondsPlayed", player.userID) / 60 / 60;
return playTime;
}
Puts("There is no plugin tracking the playtime for players");
return 0f;
}

Part 2.

Now, the next fun part.  You have to edit PlayTimeRewards.cs

Find the following line of code.
public object FetchPlayTime(string playerid)

You have 3 methods to fix here...  So replace the following "Old code" with the "New Code".

Old Code
public object FetchPlayTime(string playerid)

New Code
private object FetchPlayTime(string playerid)

Old Code
public object FetchAfkTime(string playerid)

New Code
private object FetchAfkTime(string playerid)

Old Code
public object FetchReferral(string playerid)

New Code
private object FetchReferral(string playerid)

You're all done.  Enjoy!

Why are you encouraging people to play around with .cs files ? . if you want something added to a plugin you put a suggestion in to the dev , submitting code for a plugin that is working is usually frowned upon