AfkPlus Fabric 模组


基本说明:
- 这是一个基于 beabfc 的 AfkDisplay 项目的衍生版本。他已经授权我继续开发此模组,请参阅我的“归档问题”面板。
- 在玩家列表中显示哪些玩家处于 AFK(暂离)状态,并查看原因、持续时间和时间。
- 完全可配置,并支持 Placeholder API,其中包括所有 Placeholder API 格式节点,例如原生支持的黄色或粗体文本。(你甚至可以在你的 AFK 原因中包含一个 URL!)
- 模组现在可以在单人游戏和集成服务器(局域网开放)中使用。
- [新增] 自 2024 年 12 月起,模组大部分已重写;作为基于 Fallen-Breath 的模板模组架构的多版本项目。
- [新增] 模组现已成为我的新库模组 CoreLib 的依赖项,并且更多颜色系统也已移植到我的 More Color API 模组中。
模组重写 & 新功能
- 整个模组生态系统已迁移到多版本架构,以便使用单个分支同时快速将模组移植到 1.19.2-1.21.4+ 等版本。
- 配置文件不再使用 TOML,已转换为基于数据驱动的 CoreLib JSON 配置系统;其工作方式类似于 Pat's Mod 生态系统。
- 大多数玩家/服务器事件现在由 CoreLib 接口管理;仅有少数特定于 AFK 的例外情况。
- 所有命令现在均由 CoreLib 接口注册和管理。
- 所有抽象的 Text Placeholder API 格式化和额外颜色标签现在由 More Color API 管理。参见
/morecolors 命令。
- 所有新的抽象时间日期/持续时间格式化接口均由 CoreLib 管理。
- 完全重写的 AfkPlayer / AFK 玩家列表系统基于抽象设计;而不是通过 Mixin 类进行管理。这有助于解决任何严格的模组兼容性问题;并避免丑陋的代码。
- 从 CoreLib 到 AfkPlus 的整个模组生态系统各自拥有 API/事件系统,供其他模组实现并在其模组中进行兼容。
- AfkPlus 为
Vanish、Carpet Mod 和 Styled Player List 添加了 API 兼容性处理。每个模组的集成方式根据各自的兼容性需求而有所不同。
- 添加了几个
message 选项,并将 afkKick 和 disableDamage 系统分离到它们自己的配置类别中。有关更多默认信息,请参见下方的配置。
- 根据请求添加了几种其他烦人的问题、错误修复和功能;例如,能够通过各种配置选项完全配置“离开时间:XXX”的消息。
功能特性
- 添加了占位符
%afkplus:afk%,用于为处于 AFK(离键)状态的玩家提供一个非常基础的 '[AFK]' 标签。
- 添加了占位符
%afkplus:name%/%afkplus:display_name%,以便你可以将其用作其他模组(如 Styled Playerlist)中 '%player:displayname%' 占位符的替代品。
注意:此方法旨在完全兼容 Styled Playerlist 下的 LuckPerms 前缀设置,因为标准的玩家列表更新方法会失效;或者你也可以直接使用 %afkplus:afk% 来为现有名称添加格式。
- 添加了占位符
%afkplus:duration%,以便你可以获取某人进入 AFK 状态的时间长度,并支持配置时间格式前缀。
- 添加了占位符
%afkplus:time%,以便你可以获取某人进入 AFK 状态的具体时间/日期,并支持配置时间格式前缀。
- 添加了占位符
%afkplus:reason%,以便你可以移植某人进入 AFK 的原因,并支持配置时间格式前缀。
- 添加了占位符
%afkplus:invulnerable%,以便你可以显示所有用户的“禁用伤害”状态,类似于 “[AFK]” 占位符标签,但更像是一个“附加组件”。
- 有一个特殊的配置选项 'prettyDuration',用于以更人性化的可读格式配置 AFK 持续时间,而不是默认的 (HH:mm:ss.mss) 格式。不过每种方法各有优势。(此时可以考虑使用 Styled Nicknames 或 Styled Chat)
- 包含几个针对管理员的模组/数据包冲突警告,帮助他们更好地决定要安装哪些模组。
- 添加了 "disableDamage" 配置项,使玩家在 15 秒冷却期后免受伤害。当发生这种情况时,默认强制执行一条新的可配置的服务器范围消息。
- 添加了 "disableDamageCooldown" 配置项,允许管理员调整玩家进入 AFK 状态后应用的默认“计时器”。强烈建议不要将此设置为 '0',除非你不认为你的玩家会滥用此特权。
- 添加了 "whenDamageDisabled" 配置项,以便你可以自定义当玩家被标记为无敌时显示的消息。
- 添加了 "whenDamageEnabled" 配置项,以便你可以自定义当玩家取消无敌标记时显示的消息。
- 现在还会检查玩家是否处于旁观者模式,而不仅仅是创造模式,以管理你的 AFK/禁用伤害状态。
增加了几个玩家可用于 AFK 原因的颜色节点。参见 /afkex 以获取显示示例。
brown, cyan, dark_brown, dark_pink, light_blue, light_brown, light_gray, light_pink, lime, magenta, purple, salmon,
bluetiful, burnt_orange, canary, cool_mint, copper, powder_blue, royal_purple, shamrock, tickle_me_pink, ultramarine_blue
- 添加了 "bypassSleepCount" 配置项,以便你可以允许被标记为 Afk 的玩家跳过睡眠要求。
- 添加了 "bypassInsomnia" 配置项,以便你可以允许被标记为 Afk 的玩家阻止幻翼生成。
- 添加了 "/noafk" 命令,供玩家停止自己被标记为 Afk。
- 添加了 "displayDuration" 配置选项,以便你可以启用/禁用 whenReturn 期间显示的 “已离开 XX 分钟 XX 秒”。
- 增加了额外的处理逻辑,允许将 "afkTimeoutString" 设置为 "",并将 "defaultReason" 传递为 "",以获得更多“原始”的 AfkDisplay 感觉。
- 添加了 "AFK Kick"(AFK 踢出)系统,用于在配置的时间后将自动踢出处于 AFK 状态的玩家。它具有几个配置选项:
afkKickEnabled - (true/false) 启用 AFK 自动踢出管理器。
afkKickNonSurvival - (true/false) 允许踢出创造/旁观者模式的玩家。
afkKickTimer - 超过 timeoutSeconds(累加)的时间,在此之后玩家将被移除出服务器。例如,如果 timeoutSeconds 为 240,且 afkKickTimer 设置为 3600,则实际被踢出的时间为 3840,即最长 64 分钟。
afkKickSafePermissions - (权限 3) 被标记为“安全”从而不会被自动踢出的默认权限级别。(Luck Perms: afkplus.kick.safe)
- 注意:如果玩家拥有
afkPlusCommandPermissions (Luck Perms: afkplus.afkplus),他们也将被视为自动踢出的安全对象,但此新配置允许你单独配置这些权限。
afkKickMessage - 发送给被踢出玩家的消息,作为其被移除的原因。(当 displayDuration 启用时会添加持续时间信息)
whenKicked - 当玩家因 AFK 被踢出时广播到服务器的消息。(当 displayDuration 启用时会添加持续时间信息)
- 注意事项:此功能不会自动踢出 Carpet Mod 机器人,因为这些‘假’玩家不会由服务器进行 tick 处理。
- 此功能不适用于单人游戏/开放局域网,需要专用服务器环境才能正常运行。
- '/afkplus',带有 AfkPlusCommandPermissions(默认值:4)以设置默认限制。(权限:afkplus.afkplus)
- '/afkplus reload' 命令。(权限:afkplus.afkplus.reload)
'/afkplus ex' 命令。(权限:afkplus.afkplus.ex)
此命令显示一个简单的“格式测试”,向用户展示可用的基本文本节点,并允许他们通过点击颜色/格式进行复制/粘贴。
- '/afkplus set [Player] [Reason]' 命令。(权限:afkplus.afkplus.set)
- 允许任何管理员设置玩家的 AFK 状态,同时移除其 NoAFK 状态。
- '/afkplus clear [Player]' 命令。(权限:afkplus.afkplus.clear)
- '/afkplus damage enable [Player]' 命令。(权限:afkplus.afkplus.damage.enable)
- 允许管理员强制启用处于 AFK 状态的玩家受到伤害的能力,只要该玩家保持连接。
- '/afkplus damage disable [Player]' 命令。(权限:afkplus.afkplus.damage.disable)
- 允许管理员恢复玩家在被强制移除后使用“禁用伤害”功能的能力。
- '/afkplus info [Player]' 命令。(权限:afkplus.afkplus.info)
- 允许任何管理员检查玩家的 AFK 状态,并显示自其进入 AFK 状态以来的时间和持续时间。
- '/afkplus update [Player]' 命令。(权限:afkplus.afkplus.update)
- '/afkinfo [Player]',带有 AfkInfoCommandPermissions(默认值:2)以设置默认限制,(权限:afkplus.afkinfo)
- 与 '/afkplus info [Player]' 功能相同,但可用于模组、玩家或根据您的配置方式供他人查看。
'/afkex',带有 AfkExCommandPermissions(默认值:0)以设置默认限制。(权限:afkplus.afkex)
此命令显示一个简单的“格式测试”,向用户展示可用的基本文本节点,并允许他们通过点击颜色/格式进行复制/粘贴。
- '/afk [Reason]',带有 AfkCommandPermissions(默认值:0)以设置默认限制。(权限:afkplus.afk)
- 允许任何用户在设置自身 AFK 状态时附带一个 [原因]。
- [NEW] '/noafk',带有 noAfkCommandPermissions(默认值:0)以设置默认限制。(权限:afkplus.noafk)
- 允许任何用户将自己设置为不会进入 AFK 的状态,具体取决于配置的超时时间。
- [NEW] 'afkKickSafePermissions'(默认值:3)用于设置默认权限,将处于 AFK 状态的玩家标记为免受踢出。(权限:afkplus.kick.safe)
潜在已知冲突(请自行选择)
示例配置
配置文件位于服务器 config 文件夹中的 afkplus.json 内。
{
"___comment": "AfkPlus-1.21.4-1.7.4-SNAPSHOT 配置",
"config_date": "2025年1月3日 星期五 00:05:08 -0500",
"afk_plus": {
"_comment01": "# 允许禁用 /afk 命令以将自己标记为 AFK,可选附带 [原因](默认:true)",
"enableAfkCommand": true,
"_comment02": "# 允许禁用 /noafk 命令以将自己标记为非 AFK,这将禁用超时机制(默认:true)",
"enableNoAfkCommand": true,
"_comment03": "# 允许禁用 /afkinfo 命令以允许玩家查看他人的 AFK 状态(时间、持续时间、原因)。(默认:true)",
"enableAfkInfoCommand": true,
"_comment04": "# /afk 命令的默认权限,可通过 Luck Perms (afkplus.afk) 节点进行配置(默认:0)",
"afkCommandPermissions": 0,
"_comment05": "# /noafk 命令的默认权限,可通过 Luck Perms (afkplus.noafk) 节点进行配置(默认:0)",
"noAfkCommandPermissions": 0,
"_comment06": "# /afkinfo 命令的默认权限,可通过 Luck Perms (afkplus.afkinfo) 节点进行配置(通常用于模组)(默认:2)",
"afkInfoCommandPermissions": 2,
"_comment07": "# /afkplus 命令的默认权限,可通过 Luck Perms (afkplus.afkplus with .subcommands) 节点进行配置(默认:3)",
"afkPlusCommandPermissions": 3,
"_comment08": "# 基本冷却时间,可配置以防止人们滥用 /afk 命令(默认:5秒)",
"afkCommandCooldown": 5,
"_comment09": "# 一个布尔值开关,用于在模组中启用/禁用调试日志消息",
"debugMode": false
},
"packet": {
"_comment01": "# 玩家被视为 AFK 之前的无操作时间。设置为 -1 以禁用自动 AFK 检测。(默认:240)",
"_comment02": "# --注意;原版 AfkDisplay 的默认超时时间设置为 180 秒。",
"timeoutSeconds": 240,
"_comment03": "# 将移动过的玩家视为不再处于 AFK 状态(启用如 AFK 池等简单的绕过方法)(默认:false)",
"resetOnMovement": false,
"_comment04": "# 将环顾四周的玩家视为不再处于 AFK 状态(默认:false)",
"resetOnLook": false,
"_comment05": "# 将仅挥舞剑的玩家视为 AFK(默认:false)",
"ignoreAttacks": false,
"_comment06": "# 使 AFK 玩家不计入睡眠百分比检查(默认:true)",
"bypassSleepCount": true,
"_comment07": "# 使 AFK 玩家阻止幻翼生成尝试。(默认:true)",
"bypassInsomnia": true,
"_comment08": "# 默认的“超时”AFK 原因(默认:\"<i><gray>timeout<r>\")",
"afkTimeoutString": "<i><gray>timeout<r>",
"_comment09": "# “ignoreAttacks”检测的默认 AFK 超时消息",
"afkTimeoutIgnoreAttack": "<i><gray>only swinging their sword<r>"
},
"disable_damage": {
"_comment01": "# 在玩家进入 AFK 状态 disableDamageCooldown 秒后禁用伤害(默认:false)",
"disableDamage": false,
"_comment02": "# 启用“DisableDamage”功能的冷却计时器。(默认:15秒)",
"_comment03": "# - 警告!请注意,将此设置过低可能会鼓励不良的玩家行为。",
"disableDamageCooldown": 15,
"_comment04": "# 当 AFK 玩家被标记为无敌时的消息内容。",
"_comment06": "# (默认:\"%player:displayname% <yellow>is marked as <red>Invulnerable.<r>\")",
"whenDamageDisabled": "%player:displayname% <yellow>is marked as <red>Invulnerable.<r>",
"_comment08": "# 当 AFK 玩家不再被标记为无敌时的消息内容。",
"_comment09": "# (默认:\"%player:displayname% <yellow>is no longer <red>Invulnerable.<r>\")",
"whenDamageEnabled": "%player:displayname% <yellow>is no longer <red>Invulnerable.<r>"
},
"afk_kick": {
"_comment01": "# 启用 AFK 自动踢出系统。(默认:false)",
"afkKickEnabled": false,
"_comment02": "# 允许非生存模式玩家被踢出(创造模式、旁观者模式等)(默认:false)",
"afkKickNonSurvival": false,
"_comment03": "# 在 `timeoutSeconds` 之后自动踢出 AFK 玩家的时间(默认:3600,即 1 小时)",
"_comment04": "# --注意;该值是相对于 `timeoutSeconds` 值的“累加”值,因此实际时间为 3840,即 64 分钟。",
"afkKickTimer": 3000,
"_comment05": "# 将玩家标记为免受自动踢出的“安全”状态的默认权限等级,例如服务器管理员(默认:3)",
"afkKickSafePermissions": 3,
"_comment06": "# 发送给被移除玩家的踢出原因消息。可以设置为 \"\" 以获得基本的“AFK 超时”原因。",
"_comment07": "# (默认:\"<copper>AFK beyond the allowed time limit set by your Administrator.<r>\")",
"_comment08": "# --注意;如果 `message.displayDuration` 设置为 true,此消息末尾会添加 AFK 持续时间。",
"afkKickMessage": "<copper>AFK beyond the allowed time limit set by your Administrator.<r>",
"_comment09": "# 当 AFK 玩家从服务器被踢出时的消息内容。",
"_comment10": "# (默认:\"%player:displayname% <copper>was kicked for being AFK.<r>\")",
"_comment11": "# --注意;如果 `message.displayDuration` 设置为 true,此消息末尾会添加 AFK 持续时间。",
"whenKicked": "%player:displayname% <copper>was kicked for being AFK.<r>",
"_comment12": "# 玩家被踢出时的默认原因",
"_comment13": "# (默认:\"<copper>AFK timeout\")",
"whenKickedDefaultReason": "<copper>AFK timeout",
"_comment14": "# 玩家被踢出时使用的 AFK 默认持续时间前缀。持续时间格式遵循 message.duration 配置。",
"_comment15": "# (默认:\" <gray>(Gone for: <green>\")",
"whenKickedDurationDefaultPrefix": " <gray>(Gone for: <green>"
}
}
"_comment16": "# 当玩家被踢出时使用的 AFK 玩家命名持续时间前缀。持续时间格式遵循 message.duration 配置。",
"_comment17": "# (默认值: " <gray>(%player:displayname% was gone for: <green")",
"whenKickedDurationNamedPrefix": " <gray>(%player:displayname% was gone for: <green>",
"_comment18": "# 用于两种踢出持续时间前缀的后缀",
"_comment19": "# (默认值: " <gray>)"",
"whenKickedDurationSuffix": "<gray>)"
},
"player_list": {
"_comment01": "# 更改处于 AFK 状态的玩家列表名称(默认值: true)",
"_comment02": "# -- 注意;此选项适用于您未使用玩家列表显示模组的情况。",
"enableListDisplay": true,
"_comment03": "# 如果玩家处于 AFK 状态,将在玩家列表中显示的名称,接受格式化节点",
"_comment04": "# (默认值: "<gray>[AFK%afkplus:invulnerable%] %player:displayname%<r>")",
"_comment05": "# -- 注意;在不使用玩家列表模组的情况下,此功能效果最佳!*",
"afkPlayerName": "<gray>[AFK%afkplus:invulnerable%] %player:displayname%<r>",
"_comment06": "# 此选项设置默认的玩家列表更新间隔。该配置在修复各种玩家列表更新问题方面非常有效;尤其是安装了其他玩家列表管理模组时。",
"_comment07": "# (默认值: 10 秒)",
"updateInterval": 10
},
"place_holder": {
"_comment01": "# 如果玩家处于 AFK 状态,占位符 %afkplus: afk% 的值,选项接受完整的格式化节点",
"_comment02": "# (默认值: "<gray>[AFK%afkplus:invulnerable%]<r>")",
"_comment03": "# -- 注意;不在代码末尾放置 "<r>"(试图不修改其默认行为)",
"afkPlaceholder": "<gray>[AFK%afkplus:invulnerable%]<r>",
"_comment04": "# 占位符 %afkplus:name% 用于回传整个 %displayname%,以便在其他模组中使用,例如 Styled Player List",
"_comment05": "# (默认值: "<gray>[AFK%afkplus:invulnerable%] %player:displayname_unformatted%<r>")",
"_comment06": "# -- 注意;不在代码末尾放置 "<r>"(试图不修改其默认行为)",
"afkPlusNamePlaceholderAfk": "<gray>[AFK%afkplus:invulnerable%] %player:displayname_unformatted%<r>",
"_comment07": "# 当玩家 不 处于 AFK 状态时的值,(即默认的 "%player:displayname%")",
"_comment08": "# -- 注意;不在代码末尾放置 "<r>"(试图不修改其默认行为)",
"afkPlusNamePlaceholder": "%player:displayname%",
"_comment09": "# 为 %afkplus:duration% 添加格式化前缀节点(默认值: <green>)",
"_comment10": "# -- 注意;在代码末尾放置 "<r>",这在使用 /afkinfo 命令时使用",
"afkDurationPlaceholderFormatting": "<green>",
"_comment11": "# 为 %afkplus: time% 添加格式化前缀节点(默认值: <green>)",
"_comment12": "# -- 注意;在代码末尾放置 "<r>",这在使用 /afkinfo 命令时使用",
"afkTimePlaceholderFormatting": "<green>",
"_comment13": "# 为 %afkplus: reason% 添加格式化前缀节点,我不确定为什么有人想要启用这个,因为",
"_comment14": "# 自己格式化 [Reason] 很有趣。(默认值: 无)",
"_comment15": "# -- 注意;在代码末尾放置 "<r>",这在使用 /afkinfo 命令时使用",
"afkReasonPlaceholderFormatting": "",
"_comment16": "# 添加一个选项来配置基本的“附加”占位符,以附加到 “[AFK]”标签上,标记玩家何时",
"_comment17": "# 使用 %afkplus: invulnerable% 被标记为无敌(默认值: ":<red>I<r>")",
"afkInvulnerablePlaceholder": ":<red>I<r>",
"_comment18": "# 添加一个选项,用于为 %duration% 占位符的输出使用自定义格式化程序。有效选项为:",
"_comment19": "# -- 'REGULAR' (HH:mm:ss.SSS) (默认值: REGULAR)",
"_comment20": "# -- 'PRETTY' (d' days 'H' hours 'm' minutes 's' seconds')",
"_comment21": "# -- 'ISO_EXTENDED' ('P'yyyy'Y'M'M'd'DT'H'H'm'M's.SSS'S')",
"_comment22": "# -- 'FORMATTED'; 与 ISO_EXTENDED 相同,但此选项允许您设置自己的自定义 DurationFormatUtils 格式化程序,",
"_comment23": "# --> 参见:"org.apache.commons.lang3.time.DurationFormatUtils;" 以获取更多信息",
"duration": {
"option": "REGULAR",
"customFormat": ""
},
"_comment24": "# 添加一个选项,用于为 %afkTime% 占位符的输出使用自定义格式化程序。有效选项为:",
"_comment25": "# -- 'REGULAR' (yyyy-MM-dd_HH.mm.ss);这与 Minecraft 使用的格式相同,也是默认配置。(默认值: REGULAR)",
"_comment26": "# -- 'ISO_LOCAL' (yyyy-MM-ddTHH:mm:ss.n)",
"_comment27": "# -- 'ISO_OFFSET' (yyyy-MM-ddTHH:mm:ss.nZ)",
"_comment28": "# -- 'RFC1123' (EEE, dd MMM yyyy HH:mm:ss +HHMM)",
"_comment29": "# -- 'FORMATTED'; (yyyy-MM-dd_HH.mm.ss);这与 'REGULAR' 相同,但此选项允许您设置自己的自定义",
"_comment30": "# 基于 "java.time.format.DateTimeFormatter" 格式化程序语法的格式化程序;有关更多信息,请查看该软件包。",
"timeDate": {
"option": "REGULAR",
"customFormat": ""
}
},
"message": {
"_comment01": "# 启用玩家在进入或退出 AFK 状态时的聊天消息。(默认值: true)",
"enableMessages": true,
"_comment02": "# 玩家进入 AFK 状态时的消息内容,接受格式化节点",
"_comment03": "# (默认值: "%player:displayname% <yellow>is now AFK<r>")",
"whenAfk": "%player:displayname% <yellow>is now AFK<r>",
"_comment04": "# 对 “whenAfk” 标点符号的可选配置,位于其之间以及随后的持续时间/原因之间。",
"_comment05": "# (默认值: "<yellow>,<r> ")",
"whenAfkPunctuation": "<yellow>,<r> "
"_comment06": "# 玩家从 AFK(暂离)状态返回并接受格式化节点时的消息内容。",
"_comment07": "# (默认值:"%player:displayname% <yellow>不再处于 AFK 状态<r>")",
"_comment08": "# --注意;如果 displayDuration 设置为 true,此消息末尾会附加 AFK 持续时长。",
"whenReturn": "%player:displayname% <yellow>不再处于 AFK 状态<r>",
"_comment09": "# "whenReturn" 持续时间格式化部分的前缀格式。",
"_comment10": "# (默认值:" <gray>(离开时间:<green>")",
"whenReturnDurationPrefix": " <gray>(离开时间:<green>",
"_comment11": "# "whenReturn" 持续时间格式化部分的后缀格式。",
"_comment12": "# (默认值:"<gray>)")",
"whenReturnDurationSuffix": "<gray>)",
"_comment13": "# 通过 /afk 命令进入 AFK 状态的默认原因。留空即可直接消失,无需提供原因。",
"_comment14": "# (默认值:"<gray>噗!<r>")",
"_comment15": "# --注意;"" 是有效的设置,将禁用默认的 /afk 原因。",
"defaultReason": "<gray>噗!<r>",
"_comment16": "# 当玩家反复输入 '/afk' 并期望得到错误结果时显示的自定义问候语。",
"_comment17": "# (默认值:"<yellow>欢迎回来, <r>%player:display_name%<r>, <yellow>有没有错过什么有趣的事情?")",
"afkCooldownGreeting": "<yellow>欢迎回来, <r>%player:display_name%<r>, <yellow>有没有错过什么有趣的事情?",
"_comment18": "# 当玩家被 "melius-vanish"(由 DrexHD 维护)标记为隐身时发送的一般性错误条件。",
"_comment19": "# (默认值:"<red>你已隐身,可能不应该这样做。<r>")",
"whileYourVanished": "<red>你已隐身,可能不应该这样做。<r>",
"_comment20": "# 当玩家被 "melius-vanish"(由 DrexHD 维护)标记为隐身时,在第三人称视角下发送的一般性错误条件。",
"_comment21": "# (默认值:"<red> 已隐身,可能不应该这样做。<r>")",
"whileVanished": "<red> 已隐身,可能不应该这样做。<r>",
"_comment22": "# 启用 whenReturn 消息中的持续时间显示部分。请参阅下方的 "duration" 配置。",
"_comment23": "# (默认值:true)",
"_comment24": "# 在聊天消息、/afkinfo 和 'whenReturn' 等中重新格式化 "duration",使其更易于人类阅读。",
"_comment25": "# -- 'REGULAR' (HH:mm:ss.SSS)",
"_comment26": "# -- 'PRETTY' (d'天'H'小时'm'分钟's'秒') (默认值:PRETTY)",
"_comment27": "# -- 'ISO_EXTENDED' ('P'yyyy'Y'M'M'd'DT'H'H'm'M's.SSS'S')",
"_comment28": "# -- 'FORMATTED'; 与 ISO_EXTENDED 相同,但此选项允许你设置自己的自定义 DurationFormatUtils 格式化程序,",
"_comment29": "# --> 有关更多信息,请参见:"org.apache.commons.lang3.time.DurationFormatUtils;"",
"duration": {
"option": "PRETTY",
"customFormat": ""
},
"_comment30": "# 为 /afkinfo 命令的输出添加使用自定义格式化程序的选项。有效选项包括:",
"_comment31": "# -- 'REGULAR' (yyyy-MM-dd_HH.mm.ss);这与 Minecraft 使用的格式相同,也是默认配置。(默认值:REGULAR)",
"_comment32": "# -- 'ISO_LOCAL' (yyyy-MM-ddTHH:mm:ss.n)",
"_comment33": "# -- 'ISO_OFFSET' (yyyy-MM-ddTHH:mm:ss.nZ)",
"_comment34": "# -- 'RFC1123' (EEE, dd MMM yyyy HH:mm:ss +HHMM)",
"_comment35": "# -- 'FORMATTED'; (yyyy-MM-dd_HH.mm.ss);这与 'REGULAR' 相同,但此选项允许你基于",
"_comment36": "# "java.time.format.DateTimeFormatter" 格式化程序语法设置你自己的自定义格式化程序;有关更多信息,请参见该包。",
"timeDate": {
"option": "REGULAR",
"customFormat": ""
}
}
}
AfkPlus Fabric Mod for Minecraft


Basic Description:
- A forked project based upon AfkDisplay by beabfc. He has given me his blessing with proceeding to create this mod, look under my Archived Issues pane.
- Show which players are AFK in the player list, see the Reasons, Durations, and Times.
- Fully configurable and with Placeholder API, which includes all Placeholder API formatting nodes such as: yellow or bold natively. (You can even include a URL in your AFK Reason!)
- Mod can now be used on Single Player, and Integrated Servers (Open to LAN).
- [NEW] Mod has now been mostly rewritten as of December 2024; as a MultiVersion project based on Fallen-Breath's Template Mod architecture.
- [NEW] Mod Now is a dependency of my new library mod, CoreLib, and the More Color system has also been forked into my More Color API mod.
- They are both included in the AfkPlus JAR file.
MOD ReWrite & NEW Features
- Entire mod ecosystem has been migrated to a multi-version architecture to more quickly port the mod to versions 1.19.2-1.21.4+ at the same time, using a single branch.
- Config no longer uses TOML, and has been converted to the Data Driven CoreLib based JSON config system; which works similar to how Pat's Mod ecosystem works.
- Most Player / Server Events are now managed by CoreLib interfaces; with a few AFK Specific exceptions.
- All Commands are now registered and managed by a CoreLib interface.
- All abstract Text Placeholder API formatting, and extra color tags are now managed by More Color API. See the
/morecolors command.
- All new abstract TimeDate / Duration formatting interfaces are managed by CoreLib.
- Entirely rewritten AfkPlayer / Afk Player List system based on abstraction; instead of being managed via Mixin classes. This should help with any strict mod compatibility issues; and fight off ugly code.
- Entire mod EcoSystem from CoreLib to AfkPlus each has an API / Event system for other mods to implement and make compatible in their own mods.
- AfkPlus adds API compat handling for
Vanish, Carpet Mod, and Styled Player List. Each mod's integration varies based on any compatibility needs.
- Added several
message options, and forked the afkKick and disableDamage systems into their own configuration categories. See the config below for more defaulted information.
- Several other annoyances, bugs, and features have been added as requested; such as the ability to fully configure the
Gone for: XXX messages by various config options.
Features
- Added a placeholder
%afkplus:afk% for you to offer a very basic '[AFK]' tag to players who are AFK.
- Added a placeholder
%afkplus:name%/%afkplus:display_name% so that you can use this as a replacement for the '%player:displayname%' placeholder under other Mods, such as Styled Playerlist.
NOTE that this method was designed to be fully compliant with LuckPerms Prefixes under Styled Playerlist, because the standard method for playerlist updating fails, or you can simply use %afkplus:afk% to add formatting to existing names if you like.
- Added a placeholder
%afkplus:duration% so that you can get the time since someone went AFK, with configuration for a format prefix.
- Added a placeholder
%afkplus:time% so that you can get the Time/Date when someone went AFK, with configuration for a format prefix.
- Added a placeholder
%afkplus:reason% so that you can port the Afk Reason for why someone went AFK, with configuration for a format prefix.
- Added a placeholder
%afkplus:invulnerable% so that you can display the "Disable Damage" status for all users, similar to the "[AFK]" placeholder tag, but more or less an "add on".
- There is a special configuration option 'prettyDuration' to configure the AFK Duration in a more human-readable format, instead of the default (HH:mm:ss.mss) format. Each method has its advantages though. (Styled Nicknames or Styled Chat comes to mind here)
- There are several mod / data pack conflict warnings for administrators to help them make better decisions on what mods they want to install.
- Added a "disableDamage" configuration to make AFK players immune to damage after a 15-second cool down. A new configurable server-wide message is now enforced by default when this occurs.
- Added a "disableDamageCooldown" configuration to allow Administrators to adjust the default "timer" that is applied after a player goes AFK. I highly recommend not setting this to '0', unless you don't think your players will abuse this privilege.
- Added a "whenDamageDisabled" configuration so that you can customize the message displayed when your players are marked as invulnerable.
- Added a "whenDamageEnabled" configuration so that you can customize the message displayed when your players are unmarked as invulnerable.
- Now also checks for if players are in Spectator Mode, and not only Creative for managing your AFK/Disable Damage status.
Adds several color nodes that players can use for AFK Reasons. See /afkex for a display example.
brown, cyan, dark_brown, dark_pink, light_blue, light_brown, light_gray, light_pink, lime, magenta, purple, salmon,
bluetiful, burnt_orange, canary, cool_mint, copper, powder_blue, royal_purple, shamrock, tickle_me_pink, ultramarine_blue
- Added a "bypassSleepCount" configuration so that you can allow players marked as Afk to bypass the Sleeping Requirements.
- Added a "bypassInsomnia" configuration so that you can allow players marked as Afk to block Phantom spawning.
- Added a "/noafk" command for players to stop themselves from being marked as Afk.
- Added a "displayDuration" configuration option so that you can enable/disable the "Gone for XX minutes, XX seconds" during whenReturn.
- Added additional handling to allow "afkTimeoutString" to be set to "", and passing the "defaultReason" as "" to have more of the "Original" AfkDisplay feel.
- Added a "AFK Kick" system to automatically kick players from the server who are AFK after a configured amount of time. It has several configuration options:
afkKickEnabled - (true/false) Enables the AFK Auto Kick manager.
afkKickNonSurvival - (true/false) Allows Kicking Creative / Spectator players.
afkKickTimer - The time beyond timeoutSeconds (Additive) when a player gets removed from the server, so if timeoutSeconds is 240, and afkKickTimer is set to 3600, the actual time they get kicked is at 3840, or 64 minutes at the longest.
afkKickSafePermissions - (Permission 3) The default Permissions level that is marked "safe" from being automatically kicked. (Luck Perms: afkplus.kick.safe)
- Note; that if a player has
afkPlusCommandPermissions (Luck Perms: afkplus.afkplus), they will also be marked as safe from being automatically kicked, but this new configuration allows you to configure these permissions separately.
afkKickMessage - The message sent to Players that get kicked as the reason for their removal. (Adds the Duration when displayDuration is enabled)
whenKicked - The message broadcast to the server when a player gets kicked for being AFK. (Adds the Duration when displayDuration is enabled)
- NOTES: This feature DOES NOT automatically kick Carpet Mod Bots, because the 'fake' players do not get ticked by the server.
- This feature DOES NOT work in Single Player/Open To Lan, and requires a Dedicated Server Environment to function properly.
Commands (Permissions via Luck Permissions or the afk_plus configurations)
- '/afkplus' with the AfkPlusCommandPermissions (Default: 4) setting the default restrictions. (Permission: afkplus.afkplus)
- Displays the Mod Version information.
- '/afkplus reload' command. (Permission: afkplus.afkplus.reload)
- This allows an Administrator to reload the configuration while the server is running.
'/afkplus ex' command. (Permission: afkplus.afkplus.ex)
This displays a simple "formatting test" to show the user what basic text nodes are available to use, and this also allows them to use this for Copy/Paste by clicking on colors/formats.
- '/afkplus set [Player] [Reason]' command. (Permission: afkplus.afkplus.set)
- This allows any administrator to set the AFK status of a player, and this also removes their NoAFK status.
- '/afkplus clear [Player]' command. (Permission: afkplus.afkplus.clear)
- This allows any administrator to clear the AFK status of a player.
- '/afkplus damage enable [Player]' command. (Permission: afkplus.afkplus.damage.enable)
- This allows an Administrator to force-enable an AFK player's ability to be damaged as long as they are connected.
- '/afkplus damage disable [Player]' command. (Permission: afkplus.afkplus.damage.disable)
- This allows an Administrator to revert a player's ability to use "Disable Damage" after it was forcefully removed.
- '/afkplus info [Player]' command. (Permission: afkplus.afkplus.info)
- This allows any administrator to check the AFK status of a player, and display the time and duration since they went AFK.
- '/afkplus update [Player]' command. (Permission: afkplus.afkplus.update)
- This allows any administrator to force a player list update for a player.
- '/afkinfo [Player]' with the AfkInfoCommandPermissions (Default: 2) setting the default restrictions, (Permission: afkplus.afkinfo)
- Does the same thing as '/afkplus info [Player]', but can be used for Mods, or players, or however you like to configure it for people to see.
'/afkex' with the AfkExCommandPermissions (Default: 0) setting the default restrictions. (Permission: afkplus.afkex)
This displays a simple "formatting test" to show the user what basic text nodes are available to use, and this also allows them to use this for Copy/Paste by clicking on colors/formats.
- '/afk [Reason]' with the AfkCommandPermissions (Default: 0) setting the default restrictions. (Permission: afkplus.afk)
- This allows any user to use a [Reason] along with setting their AFK status.
- [NEW] '/noafk' with the noAfkCommandPermissions (Default: 0) setting the default restrictions. (Permission: afkplus.noafk)
- This allows any user to set themselves in a state where they will not go Afk based on the configured timeout value.
- [NEW] 'afkKickSafePermissions' (Default: 3) sets the default permissions to mark an AFK player as safe from being kicked. (Permission: afkplus.kick.safe)
Potential known conflicts (Make your choice)
- afk display Data pack (Vanilla Tweaks Data pack, changes the player list display) -- Mod checks for any "afk" containing data packs in the name.
- AfkDisplay -- because this is the mod that AfkPlus is based upon, and offers fewer features.
- AntiLogout (/afk command, timeout handling)
- Auto AFK (/afk command, timeout handling)
- Sessility (timeout handling)
- Playtime-Tracker (timeout handling)
- SvrUtil (/afk command, the rest is safe)
Example Configuration
The configuration is located in afkplus.json inside your servers config folder.
{
"___comment": "AfkPlus-1.21.4-1.7.4-SNAPSHOT Config",
"config_date": "Fri, 3 Jan 2025 00:05:08 -0500",
"afk_plus": {
"_comment01": "# Allows you to disable the /afk command to mark yourself as AFK, with an optional [Reason] (Default: true)",
"enableAfkCommand": true,
"_comment02": "# Allows you to disable the /noafk command to mark yourself as NoAFK, which disables the timeout (Default: true)",
"enableNoAfkCommand": true,
"_comment03": "# Allows you to disable the /afkinfo command to allow players to see someone's AFK status (Time, Duration, Reason). (Default: true)",
"enableAfkInfoCommand": true,
"_comment04": "# The /afk default command permissions, configurable with Luck Perms (afkplus.afk) node (Default: 0)",
"afkCommandPermissions": 0,
"_comment05": "# The /noafk default command permissions, configurable with Luck Perms (afkplus.noafk) node (Default: 0)",
"noAfkCommandPermissions": 0,
"_comment06": "# The /afkinfo default command permissions, configurable with Luck Perms (afkplus.afkinfo) node (Usually for Mods) (Default: 2)",
"afkInfoCommandPermissions": 2,
"_comment07": "# The /afkplus default command permissions, configurable with Luck Perms (afkplus.afkplus with .subcommands) node (Default: 3)",
"afkPlusCommandPermissions": 3,
"_comment08": "# A Basic Cooldown configurable to help prevent people from spamming the /afk command (Default: 5 seconds)",
"afkCommandCooldown": 5,
"_comment09": "# A boolean toggle to enable / disable debug logger messages in the mod",
"debugMode": false
},
"packet": {
"_comment01": "# The time without actions after which a player is considered AFK. Set to -1 to disable automatic AFK detection. (Default: 240)",
"_comment02": "# --note; the Original AfkDisplay's default timeout was set to 180 seconds.",
"timeoutSeconds": 240,
"_comment03": "# Consider players that moved no longer AFK (enables easy bypass methods like AFK pools) (Default: false)",
"resetOnMovement": false,
"_comment04": "# Consider players which looked around no longer AFK (Default: false)",
"resetOnLook": false,
"_comment05": "# Consider players who are only swinging their sword as AFK (Default: false)",
"ignoreAttacks": false,
"_comment06": "# Makes it so that Afk players are not counted in the Sleep Percentage check (Default: true)",
"bypassSleepCount": true,
"_comment07": "# Makes it so that Afk Players block Phantom Spawning attempts. (Default: true)",
"bypassInsomnia": true,
"_comment08": "# The default \"timeout\" AFK reason (Default: \"<i><gray>timeout<r>\")",
"afkTimeoutString": "<i><gray>timeout<r>",
"_comment09": "# The default AFK timeout message for the \"ignoreAttacks\" detection",
"afkTimeoutIgnoreAttack": "<i><gray>only swinging their sword<r>"
},
"disable_damage": {
"_comment01": "# Disable damage after disableDamageCooldown seconds since a player went AFK (Default: false)",
"disableDamage": false,
"_comment02": "# Cooldown timer for enabling the \"DisableDamage\" feature. (Default: 15 seconds)",
"_comment03": "# - WARNING! Be advised that settings this too low can encourage poor player behavior.",
"disableDamageCooldown": 15,
"_comment04": "# The message content when an AFK player is marked as Invulnerable.",
"_comment06": "# (Default: \"%player:displayname% <yellow>is marked as <red>Invulnerable.<r>\")",
"whenDamageDisabled": "%player:displayname% <yellow>is marked as <red>Invulnerable.<r>",
"_comment08": "# The message content when an AFK player is no longer marked as Invulnerable.",
"_comment09": "# (Default: \"%player:displayname% <yellow>is no longer <red>Invulnerable.<r>\")",
"whenDamageEnabled": "%player:displayname% <yellow>is no longer <red>Invulnerable.<r>"
},
"afk_kick": {
"_comment01": "# Enables the AFK Auto-Kick system. (Default: false)",
"afkKickEnabled": false,
"_comment02": "# Allows Non-Survival players to be kicked (Creative, Spectator, etc) (Default: false)",
"afkKickNonSurvival": false,
"_comment03": "# The time after `timeoutSeconds` to automatically kick an AFK player (Default: 3600, aka. 1 hour)",
"_comment04": "# --note; that this value is \"Additive\" to the `timeoutSeconds` value, so the actual time will be 3840, aka. 64 minutes.",
"afkKickTimer": 3000,
"_comment05": "# Default permission level to mark players as \"safe\" from being automatically kicked, i.e., Server Admins (Default: 3)",
"afkKickSafePermissions": 3,
"_comment06": "# The Kick Reason message sent to players that are removed. Can be set to \"\" to get a basic \"AFK timeout\" reason.",
"_comment07": "# (Default: \"<copper>AFK beyond the allowed time limit set by your Administrator.<r>\")",
"_comment08": "# --note; that this message gets the AFK duration added to the end if `message.displayDuration` is set to true.",
"afkKickMessage": "<copper>AFK beyond the allowed time limit set by your Administrator.<r>",
"_comment09": "# The message content when an AFK player gets kicked from the server.",
"_comment10": "# (Default: \"%player:displayname% <copper>was kicked for being AFK.<r>\")",
"_comment11": "# --note; that this message gets the AFK duration added to the end if `message.displayDuration` is set to true.",
"whenKicked": "%player:displayname% <copper>was kicked for being AFK.<r>",
"_comment12": "# The default reason when a player is kicked",
"_comment13": "# (Default: \"<copper>AFK timeout\")",
"whenKickedDefaultReason": "<copper>AFK timeout",
"_comment14": "# The AFK default Duration Prefix used when a player is kicked. The duration format used follows the message.duration configuration.",
"_comment15": "# (Default: \" <gray>(Gone for: <green>\")",
"whenKickedDurationDefaultPrefix": " <gray>(Gone for: <green>",
"_comment16": "# The AFK Player Named Duration Prefix used when a player is kicked. The duration format used follows the message.duration configuration.",
"_comment17": "# (Default: \" <gray>(%player:displayname% was gone for: <green\")",
"whenKickedDurationNamedPrefix": " <gray>(%player:displayname% was gone for: <green>",
"_comment18": "# The suffix for either kick Duration Prefix",
"_comment19": "# (Default: \" <gray>)\"",
"whenKickedDurationSuffix": "<gray>)"
},
"player_list": {
"_comment01": "# Change the playerlist name for players who are AFK (Default: true)",
"_comment02": "# -- note; This is for when you're NOT using a player list display mods.",
"enableListDisplay": true,
"_comment03": "# The name that is shown in the player list if a player is AFK, and accepts formatting nodes",
"_comment04": "# (Default: \"<i><gray>[AFK%afkplus:invulnerable%] %player:displayname%<r>\")",
"_comment05": "# -- note; This function works best when not using Player List mods!*",
"afkPlayerName": "<i><gray>[AFK%afkplus:invulnerable%] %player:displayname%<r>",
"_comment06": "# This option sets a default Player List update interval. This config goes a long way fixing",
"_comment07": "# various Player list update issues; especially when other Player List management mods are installed.",
"_comment08": "# (Default: 10 seconds)",
"updateInterval": 10
},
"place_holder": {
"_comment01": "# This will be the value of the placeholder %afkplus: afk% if a player is AFK, option accepts full formatting nodes",
"_comment02": "# (Default: \"<i><gray>[AFK%afkplus:invulnerable%]<r>\")",
"_comment03": "# -- note; *DOES NOT* place an \"<r>\" at the end in the code (trying not to modify its default behavior)",
"afkPlaceholder": "<i><gray>[AFK%afkplus:invulnerable%]<r>",
"_comment04": "# Placeholder %afkplus:name% for backporting the entire %displayname% for use in other Mods, such as Styled Player List",
"_comment05": "# (Default: \"<i><gray>[AFK%afkplus:invulnerable%] %player:displayname_unformatted%<r>\")",
"_comment06": "# -- note; *DOES NOT* places an \"<r>\" at the end in the code (trying not to modify its default behavior)",
"afkPlusNamePlaceholderAfk": "<i><gray>[AFK%afkplus:invulnerable%] %player:displayname_unformatted%<r>",
"_comment07": "# Value for when a player is NOT AFK, (i.e., the default \"%player:displayname%\")",
"_comment08": "# -- note; *DOES NOT* places an \"<r>\" at the end in the code (trying not to modify its default behavior)",
"afkPlusNamePlaceholder": "%player:displayname%",
"_comment09": "# Adds a formatting prefix node for %afkplus:duration% (default: <green>)",
"_comment10": "# -- note; places an \"<r>\" at the end in the code, and this is used during /afkinfo",
"afkDurationPlaceholderFormatting": "<green>",
"_comment11": "# Adds a formatting prefix node for %afkplus: time% (default: <green>)",
"_comment12": "# -- note; places an \"<r>\" at the end in the code, and this is used during /afkinfo",
"afkTimePlaceholderFormatting": "<green>",
"_comment13": "# Adds a formatting prefix node for %afkplus: reason%, I'm not sure why someone might want this enabled, because",
"_comment14": "# formatting your [Reason] yourself is fun. (default: none)",
"_comment15": "# -- note; places an \"<r>\" at the end of the code, and this is used during /afkinfo",
"afkReasonPlaceholderFormatting": "",
"_comment16": "# Adds an option to configure a basic \"Add-On\" placeholder for attaching to the \"[AFK]\" tag to mark when a player is",
"_comment17": "# marked as Invulnerable using %afkplus: invulnerable% (Default: \":<red>I<r>\")",
"afkInvulnerablePlaceholder": ":<red>I<r>",
"_comment18": "# Adds an option for using custom formatters for the output of the %duration% placeholder. The valid options are:",
"_comment19": "# -- 'REGULAR' (HH:mm:ss.SSS) (Default: REGULAR)",
"_comment20": "# -- 'PRETTY' (d' days 'H' hours 'm' minutes 's' seconds')",
"_comment21": "# -- 'ISO_EXTENDED' ('P'yyyy'Y'M'M'd'DT'H'H'm'M's.SSS'S')",
"_comment22": "# -- 'FORMATTED'; Same as ISO_EXTENDED, but this option allows you to set your own custom DurationFormatUtils Formatter,",
"_comment23": "# --> SEE: \"org.apache.commons.lang3.time.DurationFormatUtils;\" for more information",
"duration": {
"option": "REGULAR",
"customFormat": ""
},
"_comment24": "# Adds an option for using custom formatters for the output of the %afkTime% placeholder. The valid options are:",
"_comment25": "# -- 'REGULAR' (yyyy-MM-dd_HH.mm.ss); which is the same format that Minecraft uses and is the Default config. (Default: REGULAR)",
"_comment26": "# -- 'ISO_LOCAL' (yyyy-MM-ddTHH:mm:ss.n)",
"_comment27": "# -- 'ISO_OFFSET' (yyyy-MM-ddTHH:mm:ss.nZ)",
"_comment28": "# -- 'RFC1123' (EEE, dd MMM yyyy HH:mm:ss +HHMM)",
"_comment29": "# -- 'FORMATTED'; (yyyy-MM-dd_HH.mm.ss); This is the same as 'REGULAR', but this option allows you to set your own custom",
"_comment30": "# formatters based on the \"java.time.format.DateTimeFormatter\" formatter syntax; see that package for more information.",
"timeDate": {
"option": "REGULAR",
"customFormat": ""
}
},
"message": {
"_comment01": "# Enables chat messages when a player goes AFk or returns. (Default: true)",
"enableMessages": true,
"_comment02": "# The message content when a player goes AFK, and accepts formatting nodes",
"_comment03": "# (Default: \"%player:displayname% <yellow>is now AFK<r>\")",
"whenAfk": "%player:displayname% <yellow>is now AFK<r>",
"_comment04": "# An optional configuration for the \"whenAfk\" punctuation in between that, and the Duration / Reason that follows.",
"_comment05": "# (Default: \"<yellow>,<r> \")",
"whenAfkPunctuation": "<yellow>,<r> ",
"_comment06": "# The messages content when a player returns from AFK, and accepts formatting nodes.",
"_comment07": "# (Default: \"%player:displayname% <yellow>is no longer AFK<r>\")",
"_comment08": "# --note; that this message gets the AFK duration added to the end if `displayDuration` is set to true.",
"whenReturn": "%player:displayname% <yellow>is no longer AFK<r>",
"_comment09": "# The prefix formatting for the \"whenReturn\" duration formatting portion.",
"_comment10": "# (Default: \" <gray>(Gone for: <green>\")",
"whenReturnDurationPrefix": " <gray>(Gone for: <green>",
"_comment11": "# The suffix formatting for the \"whenReturn\" duration formatting portion.",
"_comment12": "# (Default: \"<gray>)\")",
"whenReturnDurationSuffix": "<gray>)",
"_comment13": "# Default reason for going AFK via the /afk command. Leave in a poof of smoke without having to give a reason.",
"_comment14": "# (Default: \"<gray>poof!<r>\")",
"_comment15": "# --note; \"\" is a valid setting, and will disable the default /afk reason.",
"defaultReason": "<gray>poof!<r>",
"_comment16": "# A configurable greeting when players repeatedly type '/afk' and expect a broken result.",
"_comment17": "# (Default: \"<yellow>Welcome back, <r>%player:display_name%<r>, <yellow>did you miss anything fun?\")",
"afkCooldownGreeting": "<yellow>Welcome back, <r>%player:display_name%<r>, <yellow>did you miss anything fun?",
"_comment18": "# An general error condition sent when a player is marked as Vanished by \"melius-vanish\" maintained by DrexHD",
"_comment19": "# (Default: \"<red>You are vanished, and probably shouldn't be doing that.<r>\")",
"whileYourVanished": "<red>You are vanished, and probably shouldn't be doing that.<r>",
"_comment20": "# An general error condition in the third person sent when a player is marked as Vanished by \"melius-vanish\" maintained by DrexHD",
"_comment21": "# (Default: \"<red> is vanished, and probably shouldn't be doing that.<r>\")",
"whileVanished": "<red> is vanished, and probably shouldn't be doing that.<r>",
"_comment22": "# This enables the duration display portion of the whenReturn message. See the \"duration\" configuration below.",
"_comment23": "# (Default: true)",
"displayDuration": true,
"_comment24": "# Re-Formats the \"duration\" in chat messages and /afkinfo and 'whenReturn', etc; to a more human-readable format.",
"_comment25": "# -- 'REGULAR' (HH:mm:ss.SSS)",
"_comment26": "# -- 'PRETTY' (d' days 'H' hours 'm' minutes 's' seconds') (Default: PRETTY)",
"_comment27": "# -- 'ISO_EXTENDED' ('P'yyyy'Y'M'M'd'DT'H'H'm'M's.SSS'S')",
"_comment28": "# -- 'FORMATTED'; Same as ISO_EXTENDED, but this option allows you to set your own custom DurationFormatUtils Formatter,",
"_comment29": "# --> SEE: \"org.apache.commons.lang3.time.DurationFormatUtils;\" for more information",
"duration": {
"option": "PRETTY",
"customFormat": ""
},
"_comment30": "# Adds an option for using custom formatters for the output of the /afkinfo command. The valid options are:",
"_comment31": "# -- 'REGULAR' (yyyy-MM-dd_HH.mm.ss); which is the same format that Minecraft uses and is the Default config. (Default: REGULAR)",
"_comment32": "# -- 'ISO_LOCAL' (yyyy-MM-ddTHH:mm:ss.n)",
"_comment33": "# -- 'ISO_OFFSET' (yyyy-MM-ddTHH:mm:ss.nZ)",
"_comment34": "# -- 'RFC1123' (EEE, dd MMM yyyy HH:mm:ss +HHMM)",
"_comment35": "# -- 'FORMATTED'; (yyyy-MM-dd_HH.mm.ss); This is the same as 'REGULAR', but this option allows you to set your own custom",
"_comment36": "# formatters based on the \"java.time.format.DateTimeFormatter\" formatter syntax; see that package for more information.",
"timeDate": {
"option": "REGULAR",
"customFormat": ""
}
}
}
评论 0
登录后参与评分
还没有评论,来抢沙发吧