Once this plugin is added to your projects' external libraries you can start to use it!
The API works from two different methods.
A
TimelessPlayer and a
TimelessServer.
TimelessPlayer:
A TimelessPlayer can either be online or offline.
Example: Creating an online player:
Code (Java):
TimelessPlayer player
=
new TimelessPlayer
(event.
getPlayer
(
)
)
;
*If the player is offline or unknown use a UUID instead of a Player!
Example: Creating an offline player:
Code (Java):
TimelessPlayer player
=
new TimelessPlayer
(uuid
)
;
A Timeless player has the following methods:
Code (Text):
getPlayTime() - returns playtime of player in format
getDays() - returns days played
getHours() - returns hours played
getMins() - returns minutes played
getSecs() - returns seconds played
TimelessServer:
A TimelessServer can display the top 10 leaderboard info and uptime!
To create a TimelessServer simply do:
Code (Java):
TimelessServer server
=
new TimelessServer
(
)
;
The methods a TimelessServer can do are:
Code (Text):
getTop10Players() - returns top 10 players in a list
getNumberOne() - returns number 1 in leaderboard
getNumberTwo() - returns number 2
getNumberThree()... all the way to getNumberTen()
getUptime() - returns server uptime in format
getUptimeInSeconds() - returns uptime in seconds
NOTE: It is recommended to use getTop10Players() and retrieving the other positions when dealing with multiple positions.
For further help join the help discord
P.S old API works but will be removed in 2-3 updates!