API for player time??

Status
This thread has been locked.

Nulium

Feedback score
1
Posts
21
Reactions
4
Resources
0
Yo guys, i was searching in google, bukkit and spigot, but nothing i was asking about, how long player have played in minutes in the server... can someone give me a Code or API??
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Spoch

Developer & Game seller
Supreme
Feedback score
13
Posts
269
Reactions
112
Resources
0
Store timestamps of when they join and check it against the current time?
 

Ketchup

certified cool guy
Supreme
Feedback score
6
Posts
122
Reactions
67
Resources
0
Doesn't placeholderAPI have this?
 

Nulium

Feedback score
1
Posts
21
Reactions
4
Resources
0
Doesn't placeholderAPI have this?
I think the placeholder have it but i need to add it in my plugin..
There is no inbuilt features in the Spigot API for it so you would have to use that method.
I try an another method and i wanna ask you is it good:

int minute = (((Player)p).getStatistic(Statistic.PLAY_ONE_TICK) / 1200);
long minutes = TimeUnit.MINUTES.toMinutes(minute);
 
Status
This thread has been locked.
Top