NoNoLife
这是一个用于 Minecraft 服务器的 Fabric 服务端模组,旨在限制玩家每日的游戏时长。
这样就没有人可以“没日没夜”地玩游戏了。
工作原理
每位玩家都有一定的可用游戏时长,在游戏过程中,你的可用时长会倒计时。
当时长归零时,你将被踢出服务器。
每天会为所有玩家发放可配置数量的游戏时长。
如果未用完的时长可以累积到可配置的上限。
剩余游戏时长会通过屏幕顶部的一个进度条来显示。
总游戏时长也会在玩家(标签页)列表中追踪并显示。
安装
该模组完全位于服务端,因此无需客户端模组!
请确保你已安装 Fabric API,
然后将 nonolife-X.X.X.jar 文件添加到服务器的 mod 文件夹中即可。
配置
若要按喜好配置该模组,请在服务器的 config 文件夹中创建一个 json 文件。
文件名应为 nonolife.json
示例文件内容(包含默认值):
{
"dailyPlaytime": 3600,
"initialPlaytime": 3600,
"maximumPlaytime": 14400,
"addPlaytimeAtHour": 4,
"showTotalPlaytime": true
}
- dailyPlaytime 设置每位玩家每天获得的游戏时长(秒)(默认值:3600)
- initialPlaytime 设置玩家首次加入服务器时获得的游戏时长(秒)(默认值:3600)
- maximumPlaytime 设置单个玩家可以累积的最大游戏时长(秒)(默认值:14400)
- addPlaytimeAtHour 设置每天在整点小时发放游戏时长(默认值:4)
- showTotalPlaytime 控制是否在玩家(标签页)列表中显示总游戏时长(默认值:true)
如果你想使用默认值,则无需提供对应的配置键。如果你想使用所有默认值,甚至可以完全不创建该文件。
命令
/playtime hide 隐藏剩余游戏时长指示条
/playtime show 显示剩余游戏时长指示条
NoNoLife
This is a fabric server side mod to limit daily playtime on a minecraft server.
So no one can "no-life" the game.
How it works
Each player has some playtime available, while playing your available playtime is counted down.
When it reaches 0 you get kicked from the server.
Every day a configurable amount of playtime is granted to all players.
When playtime is not used up it stacks up to a configurable limit.
Remaining playtime is indicated with a bar at the top of the screen.
Total playtime is also tracked and displayed in the player (tab) list.
Installation
This mod is fully server side, so no client mod required!
Make sure you have the Fabric API,
then just add the nonolife-X.X.X.jar file to your server's mod folder and off you go.
Config
To configure the mod to your liking create a file json in your servers config folder.
The file should be called nonolife.json
Example file content (with default values):
{
"dailyPlaytime": 3600,
"initialPlaytime": 3600,
"maximumPlaytime": 14400,
"addPlaytimeAtHour": 4,
"showTotalPlaytime": true
}
- dailyPlaytime sets the playtime in seconds each player is granted every day (default: 3600)
- initialPlaytime sets the playtime in seconds a player is granted when he/she first joins the server (default: 3600)
- maximumPlaytime sets the maximum amount of playtime in seconds that one can accumulate (default: 14400)
- addPlaytimeAtHour sets at which full hour the daily playtime is granted (default: 4)
- showTotalPlaytime controlls if the total playtime is shown in the player (tab) list (default: true)
If you want to use a default value you do not have to provide the configuration key. If you want to use all defaults you can just not create the file at all.
Commands
/playtime hide hides the remaining playtime indicator bar
/playtime show shows the remaining playtime indicator bar
评论 0
登录后参与评分
还没有评论,来抢沙发吧