Open XAMPP, start apache, and MySQL. click admin on MySQL
Create the database with the name you assigned in the timeplayed.yml file
Review the users and add the information for the root user to your timeplayed.yml file
Code (Java):
@EventHandler
publicvoid onJoin
(PlayerJoinEvent e
){ //Get the user's time played in format (hh hrs, mm mins, ss secs) String time
= CTTimePlayed.
getPlayerTime(e.
getPlayer()); //Get the user's time played in format (hh:mm:ss) String timeRaw
= CTTimePlayed.
getPlayerTime(e.
getPlayer(),
true); //Assign hours to the player in hh: mm: ss format CTTimePlayed.
setPlayerTime(e.
getPlayer(),
"200:43:15"); //Returns a list of the players with the most playing time starting with the highest List
<String
> topList
= CTTimePlayed.
getTopTimeList();
}
I would really appreciate if you would leave a review of the plugin. To report bugs please do so using discord.