Server Playtime Manager
This modification provides tools for controlling player time on the server within a 24-hour period. This helps maintain balance among participants and prevents excessive fatigue from extended gaming sessions.
Configuration
Timezone Specifies the time zone for calculating day boundaries. If players are in different time zones, using UTC is recommended - this ensures a uniform 24-hour period for everyone.
Maximum Time (maxTime) Sets the time limit in ticks that a player can spend on the server per day. The standard tick duration is 50 milliseconds.
Non-tracking Periods During these intervals, players can be on the server without restrictions, and their time will not count toward the daily limit.
Configuration Example
{
timezone: "Z", // Z corresponds to UTC
maxTime: "72000", // 72000 ticks = 1 hour
nonTrackingPeriods [
{
startTime: "06:00+01:00", // Time is specified in ISO 8601 format with offset
endTime: "08:00+01:00"
} // The period from 6:00 to 8:00 UTC+1 is not counted in tracking
]
}
Available Commands
The modification includes a set of commands for managing settings and monitoring playtime:
playerplaytime query- command for players showing their current playtime for the day in seconds (assuming 50ms per tick). Requires no special permissions.playerplaytime query [Player]- displays the specified player's daily time in seconds. Requires access level 2.playerplaytime set [Player] [Time]- sets the specified number of ticks as playtime for the indicated player. Requires access level 3.playerplaytime config reload- reloads the configuration file when changes are made. Requires access level 2.playerplaytime set maxTime [Time]- changes the maxTime value in configuration to the specified number. Requires access level 2.playerplaytime get maxTime- outputs the current maxTime value from configuration. Requires access level 2.