Configuration

ActiveTimes configuration contains two primary files: activetime.core in the main directory, and milestones.conf in the configuration folder.

activetime.core

The core configuration file for ActiveTime containing the main settings.


filters

Filters that specify conditions required for a player to have their time logged.


gamemodes

Type: String[]

The ids of gamemodes (survival, creative, etc.) that have their activity tracked. If empty, all gamemodes are included.


worlds

Type: String[]

The names of worlds that have their activity tracked. If empty, all worlds are included.


formats

The unit formats for displaying times. The # symbol is replaced with the time for that unit, and <s> can be used to include an s if the unit is plural. A unit can be discluded by leaving it empty and the time will ‘cascade’ down to the next unit. Units that are not empty will be joined together with the separator.

formats {
    weeks="#w"
    days="#d"
    hours="#h"
    minutes="#m"
    seconds="#s"
    separator=""
}

intervals

The intervals (in seconds) for various ActiveTime tasks.


limit

Type: int

The interval between playtime limit checks. This task is used to check if players have surpassed their playtime for the given day as set using the playtime option. For example, a limit of 1 hour (3600 seconds) can be set using LuckPerms with lp user <player> meta set playtime 3600. If you are not limiting time for any players, it is recommended to disable this task (set to -1).


milestone

Type: int

The interval between milestone checks. This task is used to check milestones that exist in milestones.conf (see below). If you are not using any milestones, it is recommended to disable this task (set to -1).


save

Type: int

The interval between saving the cache. This task is used to save cached times to the appropriate log files. It is also used for updating the leaderboard and may not be disabled.


update

Type: int

The interval between updating the cache. This task is used to check all of the online players for activity and store data in a temporary cache. This information is not saved to a file until the save task runs, so server crashes may cause cached data to be lost. It is recommended to keep this value at 1 unless you are experiencing major performance issues related to ActiveTime. This task may not be disabled.


leaderboard

Settings related to the Leaderboard command.


default

Type: int

The default number of positions to display.


maximum

Type: int

The maximum number of positions to display. It should be noted that this command queries a cached leader for all players, so the performance impact for having this at higher numbers should be negligible, though it is recommended to keep this relatively low.


report

Settings related to the Report command.


maximum

Type: int

The maximum length (in days) allowed for a report.


milestones.conf

Holds milestones for player’s activetime. The name of the milestone is the node key and is used as a unique identifier for the milestone. Players must have the permission activetime.milestones.<name>.base to be checked for a milestone. If a milestone is added after a player has passed the required time, it will be given to them when the next check is made.


activetime

Type: int The activetime (in seconds) a player must have for this milestone to be met.


commands

Type: String[]

The command to be executed by the server when this milestone is met. Use <player> for the name of the player. If multiple commands are needed, consider using a plugin that can link commands such as CmdControl.


repeatable

Type: boolean

Whether the milestone can be received multiple times. If the milestone is repeatable, player’s must wait the duration of the milestone’s time before receiving it again.

Examples

This example shows a milestone that broadcasts a message after the player has been active for one hour.

one-hour {
    activetime=3600
    commands=["broadcast <player> has been online for 1 hour!"]
}

This example shows a milestone that gives the player a cookie each time the player is active for 15 minutes.

cookies {
    activetime=900
    commands=[
        "tell <player> Thanks for staying with us! Have a cookie ^^"
        "give <player> cookie"
    ]
    repeatable=true
}

Category: Admin Tools

Published on Feb 6, 2018

views

stars

watchers

total downloads

Promoted Versions

Members