TimePlayed icon

TimePlayed -----

In depth logging of players playtime.



[​IMG]
TimePlayed keeps track of how often and long your players are playing on your server, you can use this to gain accurate understanding of how often both your players and staff are actually playing on your server and keep a record of their play time.

/TimePlayed Online opens a UI showing playtime information for all online players.
[​IMG]

/TimePlayed [Player] works for both online and offline players, and has some more in-depth information on that users playtime.
/TimePlayed [Player] opens an overview for that player showing a head entry for each year in which that player has playtime tracked:
[​IMG]

Selecting a year entry will open up a menu corresponding to that year, showing a list of entries for each month within that year:
[​IMG]

And finally, selecting a month entry will open up a menu corresponding to that month, showing a list of entries for each day within that month:
[​IMG]

/TimePlayed All opens a UI showing the playtime stats for every player captured by TimePlayed (Since it was installed).
[​IMG]

/TimePlayed Active opens a UI showing the playtime stats for the most active players. 'Most active' is determined by two values set in the config, the timeframe to capture only players who have played recently, and the minimum_time to capture players who have played for at least the minimum amount of time. The default settings for these are 7 days and 1 hour, respectively, so this UI shows players who have played for at least 1 hour within the last 7 days.

[​IMG]
TimePlayed will run fine the moment you download it. However there are some options in the config.yml you can change.
Code (Text):
Colors:
  Primary: "&6"
  Secondary: "&f"
Permissions:
  Required_For_Command:
    Timeplayed_Online: false
    Timeplayed_Self: false
    Timeplayed_Other: true
    Timeplayed_Active: true
    Timeplayed_All: true
Active:
  Timeframe: 604800000 // milliseconds (7 days)
  Minimum_Time: 3600000 // milliseconds (1 hour)

[​IMG]
TimePlayed has a fairly solid API which you can hook into to get access to a number of handy methods.
Code (Text):
TimePlayedAPI timePlayedAPI = TimePlayed.getAPI();
Code (Text):
interface TimePlayedAPI {

    ITimeData getTimeData(UUID uuid);

    List<ITimeData> getActive();

    List<ITimeData> getActive(boolean orderByPlaytime);

    List<ITimeData> getAll();

    boolean isAFK(OfflinePlayer player);
}
ITimeData represents the stored playtime data for a single player
Code (Text):
interface ITimeData {

    UUID getOwner();

    long getTimePlayedWithin(long start, long end);

    int totalSessions();

    List<ISession> getSessions();

    long getTotalPlaytime();

    String getFriendlyTotalPlaytime();

    long getAveragePlaytime();

    String getFriendlyAveragePlaytime();

    long getFirstLogin();

    String getFriendlyFirstLogin();

    long getLastLogin();

    String getFriendlyLastLogin();
}
ISession represents a single playtime session
Code (Text):
interface ISession {

    boolean contains(long timestamp);

    long getStart();

    long getEnd();

    boolean hasEnd();

    long getLength();

    String getFriendlyLength();
}

[​IMG]
timeplayed.command.timeplayed.* Access to all timeplayed commands
timeplayed.command.timeplayed.online Access to /TimePlayed Online
timeplayed.command.timeplayed.self
Access to /TimePlayed [Player] for self
timeplayed.command.timeplayed.other Access to /TimePlayed [Player] of other players
timeplayed.command.timeplayed.active Access to /TimePlayed Active
timeplayed.command.timeplayed.all
Access to /TimePlayed All
Resource Information
Author:
----------
Total Downloads: 4,089
First Release: Mar 10, 2016
Last Update: Mar 23, 2021
Category: ---------------
All-Time Rating:
5 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings