服务器在线时长管理器
一款模组,用于管理服务器上的每日在线时长,以避免玩家之间差距过大以及防止过度疲劳。
配置
timezone(时区)
指定用于定义午夜时分的时区。如果玩家分布在多个时区,使用 UTC 即可,因为它仍然代表一个 24 小时周期。
maxTime(最大时长)
玩家单独在服务器上可游玩的最大时间,单位为刻(ticks)。在正常刻率下,1 刻等于 50 毫秒。
nonTrackingPeriods(不记录时段)
允许所有人一起游玩而不记录在线时长的时间段。
示例配置
{
timezone: "Z", // Z 表示 UTC
maxTime: "72000", // 72000 刻 - 1 小时
nonTrackingPeriods [
{
startTime: "06:00+01:00", // 时间以带偏移量的格式指定,符合 ISO 8601 标准
endTime: "08:00+01:00"
} // 创建 UTC+1 早上 6 点到 8 点之间的不记录时段
]
}
命令
该模组提供了一些命令,用于设置和管理在线时长。
playerplaytime query - 必须由玩家执行。返回该玩家当天的在线时长(秒为单位,假设 50 毫秒/刻)。不需要任何权限等级。
playerplaytime query [Player] - 返回指定玩家当天的在线时长(秒为单位)。需要权限等级 2。
playerplaytime set [Player] [Time] - 将指定玩家当天的在线时长设置为指定值(单位为刻)。需要权限等级 3。
playerplaytime config reload - 如果配置文件有任何更改,则重新加载配置文件。需要权限等级 2。
playerplaytime set maxTime [Time] - 将配置中的 maxTime 设置为指定的数值。需要权限等级 2。
playerplaytime get maxTime - 返回配置中的 maxTime 值。需要权限等级 2。
Server Playtime Manager
A mod to manage daily playtime on a server to help avoid people advancing far beyond others and to avoid burnout.
Config
timezone
Specifies which timezone to define midnight from. If players are split accross multiple timezones UTC should be fine as it will still be a 24 hour period.
maxTime
The maximum time in ticks a player can play on the server alone for. At normal tickrates a tick is 50ms.
nonTrackingPeriods
Times when everyone can play together without playtime being tracked.
Example Config
{
timezone: "Z", // Z means UTC
maxTime: "72000", // 72000 ticks - 1 hour
nonTrackingPeriods [
{
startTime: "06:00+01:00", // Time is specified as time with offset in accordance with ISO 8601
endTime: "08:00+01:00"
} // Creates a non tracking period between 6am UTC+1 and 8am UTC+1
]
}
Commands
The mod has some commands to help with settings and managing playtime
playerplaytime query - Must be run by a player. Returns that player's playtime today in seconds (assuming 50 mspt). Doesn't require any permission level.
playerplaytime query [Player] - Returns specified player's playtime today in seconds. Requires permission level 2.
playerplaytime set [Player] [Time] - Sets the specified player's playtime today to the time specified (in ticks). Requires permission level 3.
playerplaytime config reload - Reloads the config file if any changes have been made. Requires permission level 2.
playerplaytime set maxTime [Time] - Sets the maxTime in the config to the number specified. Requires permission level 2.
playerplaytime get maxTime - Returns the maxTime from the config. Requires permission level 2.
评论 0
登录后参与评分
还没有评论,来抢沙发吧