描述
ViaVersionStatus 会在玩家加入服务器时报告他们正在使用的 Minecraft 版本。报告将被发送到你的服务器日志文件,以及拥有 viaversionstatus.notify 权限的在线玩家。此外,如果玩家使用的客户端版本与服务器版本不匹配,插件可以向该玩家发送一条警告信息。插件还可以根据客户端的版本执行控制台命令。
配置文件中已提供合理的默认值,因此你只需将插件放入 plugins 文件夹并重启服务器即可。此插件需要 ViaVersion 和 Java 17+。


注意,ViaVersion 提供了一个命令来显示所有当前在线玩家的版本:/viaversion list
权限
ViaVersionStatus 拥有多项权限,允许你对其行为进行微调。但实际上,你只需要将 viaversionstatus.notify 权限授予你希望接收其他玩家加入时游戏内版本通知的管理员即可。如果你给自己赋予了 * 权限,可能还需要将 viaversionstatus.notify.ignoresame 设置为 false。
以下是所有 ViaVersionStatus 权限的详细信息:
权限详情
以下权限通常仅授予管理员,因为它们控制着玩家加入服务器时的游戏内通知。
viaversionstatus.notify - 拥有此权限的玩家在加入服务器时,会收到一条包含该玩家客户端版本的消息(如上所示)。默认为 op。
viaversionstatus.notify.ignoresame - 拥有此权限的玩家,如果其客户端版本与服务器版本匹配,则不会收到包含该玩家客户端版本的消息。默认为 false。
以下权限适用于加入你服务器的玩家,可用于精确控制当他们加入时触发 ViaVersionStatus 的哪些功能。以下所有权限默认均为 false,因此只需给予特定玩家某项权限,即可使其免除相应的处理。如果你希望为所有玩家禁用大部分功能,也可以在配置文件中直接关闭它们。
viaversionstatus.exempt - 使该玩家在加入时免除所有处理。
viaversionstatus.exempt.log - 使该玩家在加入时免除记录客户端版本。
viaversionstatus.exempt.notify - 使该玩家在加入时免除通知其他玩家,同时阻止其触发配置的加入通知命令。
viaversionstatus.exempt.notify.message - 使该玩家在加入时免除通知其他玩家。
viaversionstatus.exempt.notify.command - 使该玩家在加入时免除触发配置的加入通知命令。
viaversionstatus.exempt.warn - 使该玩家在加入时免除接收旧版本警告,同时阻止其触发配置的旧版本警告命令。
viaversionstatus.exempt.warn.message - 使该玩家在加入时免除接收旧版本警告。
viaversionstatus.exempt.warn.command - 使该玩家在加入时免除触发配置的旧版本警告命令。
viaversionstatus.exempt.warn.newer - 使该玩家在加入时免除接收新版本警告,同时阻止其触发配置的新版本警告命令。
viaversionstatus.exempt.warn.newer.message - 使该玩家在加入时免除接收新版本警告。
viaversionstatus.exempt.warn.newer.command - 使该玩家在加入时免除触发配置的新版本警告命令。
配置(可选)
配置文件中的字符串可以使用四个变量:%player% 会被替换为玩家的名字,%displayname% 会被替换为玩家的“显示名称”,%version% 会被替换为玩家客户端的版本,%server% 会被替换为检测到的服务器版本。你也可以使用标准的 Minecraft 颜色代码。字符串应使用双引号括起来("…")。
notify-ops - 如果为 true,当任何玩家加入服务器时,op 将会收到关于其客户端版本的通知。
notify-string - 当任何玩家加入服务器时,这条消息会发送给拥有 viaversionstatus.notify 权限的玩家。
notify-command - 当有玩家加入服务器时,控制台会执行此命令(默认为无)。
warn-players - 如果为 true,使用比服务器版本旧的客户端加入的玩家将会收到由 warn-string 消息定义的警告。
warn-string - 当启用时,这条消息会发送给使用比服务器版本旧的客户端加入的玩家。注意,必须将 warn-players 设置为 true 才能使用此项。
warn-command - 当有玩家使用比服务器版本旧的客户端加入服务器时,控制台会执行此命令(默认为无)。注意,必须将 warn-players 设置为 true 才能使用此项。
warn-players-newer - 如果为 true,使用比服务器版本新的客户端加入的玩家将会收到由 warn-string 消息定义的警告。
warn-string-newer - 当启用时,这条消息会发送给使用比服务器版本新的客户端加入的玩家。注意,必须将 warn-players-newer 设置为 true 才能使用此项。
warn-command-newer - 当有玩家使用比服务器版本新的客户端加入服务器时,控制台会执行此命令(默认为无)。注意,必须将 warn-players-newer 设置为 true 才能使用此项。
high-priority - 当设置为 true 时,ViaVersionStatus 将在登录过程的较晚阶段运行。如果 notify-string 中的 %displayname% 未按预期工作,这可能会很有用。
list-supported-protocols - 如果为 true,ViaVersion 支持的协议(Minecraft 版本)将在启动时写入日志文件。
enable-metrics - 如果为 true,bStats 指标将通过此插件启用,并受 bStats 全局配置条目的约束。
prism-integration - 如果为 true,ViaVersionStatus 将向 Prism 日志插件发送一个事件,包含玩家名称和客户端版本。更多详细信息请参阅下文。
prism-action-string - 此字符串用于 Prism 在显示玩家客户端版本时。
关于 %displayname% 的说明:显示名称由其他插件设置,因此这取决于其他插件的时机。特别是 EssentialsX 有一个内置的时间延迟,这将导致显示名称不会出现在发送给管理员的通知中。然而,显示名称可以在发送给玩家的版本警告中使用。
默认配置会产生上述消息。
Prism 集成
如果您使用 Prism V4 日志插件,您可以让 ViaVersionStatus 在玩家加入服务器时记录每个玩家的名称和客户端版本。Prism V4 是 Prism 的完全重写。该事件以 vvs-connect 操作记录。您可以在查找时使用参数 a:connect 指定它。您必须使用 Prism V4.3-dev31 或更高版本。
为了启用 Prism 集成,您需要将 ViaVersionStatus 配置文件中的 prism-integration 设置为 true。如果成功钩入 Prism,ViaVersionStatus 将写入日志文件。
以下是 Prism 查找结果的示例:

命令
无。
杂项
此插件与 ViaVersion、ViaBackwards 和 ViaRewind 兼容。
此插件使用 bStats 指标系统提供 匿名 使用数据。您可以通过更改 ViaVersionStatus 配置文件中的 enable-metrics 来选择不参与。这些指标可在 查看
Description
ViaVersionStatus will report which Minecraft versions your players are using when they join your server. Reports are sent to your server log file and online players with the permission viaversionstatus.notify. Optionally, if a player joins with a client version different than your server version, the plugin can send the player a warning that he's not using the matching client version. The plugin can also issue console commands based on the client's version.
Reasonable default values are provided in the configuration file, so you can simply put the plugin in your plugins folder and restart your server. The plugin requires ViaVersion and Java 17+.


Note that ViaVersion provides a command to show the versions of all currently online players: /viaversion list
Permissions
ViaVersionStatus has a number of permissions to allow fine-tuning of its behavior. However, all you really need to do is give the permission viaversionstatus.notify to admins you want to receive in-game version notifications when other players join. If you give yourself the '*' permission, you might also want to set viaversionstatus.notify.ignoresame to false.
Following are details of all ViaVersionStatus permissions:
Permission Details
The following permissions normally given only to admins, as they control the in-game notification given when players join the server.
viaversionstatus.notify - A player with this permission will get a message with the player's client version (as shown above) when they join the server. Defaults to op.
viaversionstatus.notify.ignoresame - A player with this permission will not get a message with the player's client version if the client's version matches the server's version. Defaults to false.
The following permissions apply to the players joining your server and can be used to control exactly which features of ViaVersionStatus will be invoked when they join. All of the following permissions default to false, so simply give a player(s) a permission to exempt them from the corresponding processing. Most of these features can also be disabled in the config file if you want to do so for all players.
viaversionstatus.exempt - Exempts this player from all processing at join.
viaversionstatus.exempt.log - Exempts this player from client version being logged at join.
viaversionstatus.exempt.notify - Exempts this player from notifying other players at join while also preventing them from triggering the configured join notification command.
viaversionstatus.exempt.notify.message - Exempts this player from notifying other players at join.
viaversionstatus.exempt.notify.command - Exempts this player from triggering the configured join notification command.
viaversionstatus.exempt.warn - Exempts this player from receiving an older version warning while also preventing them from triggering the configured older version warning command.
viaversionstatus.exempt.warn.message - Exempts this player from receiving an older version warning.
viaversionstatus.exempt.warn.command - Exempts this player from triggering the configured older version warning command.
viaversionstatus.exempt.warn.newer - Exempts this player from receiving an newer version warning while also preventing them from triggering the configured newer version warning command.
viaversionstatus.exempt.warn.newer.message - Exempts this player from receiving a newer version warning.
viaversionstatus.exempt.warn.newer.command - Exempts this player from triggering the configured newer version warning command.
Configuration (optional)
Strings in the configuration file can use four variables: %player% is replaced with the player's name, %displayname% is replaced with the player's "display name", %version% is replaced with the version of the player's client, and %server% is replaced with the detected server version. You can also use the standard Minecraft color codes. Strings should be enclosed in double quotes ("…").
notify-ops - If true, ops will be notified of the client's version when any player joins the server.
notify-string - This message is sent to players with the viaversionstatus.notify permission when any player joins the server.
notify-command - This command is issued by the console when a player joins the server (defaults to none).
warn-players - If true, players joining with a client that is older than the server version will be warned with the warn-string message.
warn-string - This message is set to players joining with a client that is older than the server version, if enabled. Note that warn-players must be true to use this.
warn-command - This command is issued by the console when a player joins with a client that is older than the server version (defaults to none). Note that warn-players must be true to use this.
warn-players-newer - If true, players joining with a client that is newer than the server version will be warned with the warn-string message.
warn-string-newer - This message is set to players joining with a client that is newer than the server version, if enabled. Note that warn-players-newer must be true to use this.
warn-command-newer - This command is issued by the console when a player joins with a client that is newer than the server version (defaults to none). Note that warn-players-newer must be true to use this.
high-priority - When set to true, ViaVersionStatus will run later in the login process. This can be useful if %displayname% in notify-string is not working as expected.
list-supported-protocols - If true, the protocols (Minecraft versions) supported by ViaVersion will be written to the log file at startup.
enable-metrics - If true, bStats metrics will be enabled by this plugin, subject to the bStats global config entry.
prism-integration - If true, ViaVersionStatus will send an event to the Prism logging plugin, with the player's name and client version. See the section below for more details.
prism-action-string - This string is used by Prism when displaying a player's client version.
A note about %displayname%: The displayname is set by other plugins, so this is dependent on the other plugin's timing. In particular, EssentialsX has a built-in time delay which will prevent the displayname from appearing in the notification sent to ops. However, the displayname can be used in the version warning sent to the players.
The default configuration results in the messages shown above.
Prism Integration
If you use the Prism V4 logging plugin, you can have ViaVersionStatus log each player's name and client version when they join the server. Prism V4 is a complete rewrite of Prism. The event is logged with the action vvs-connect. You can specify this during a lookup with the parameter a:connect. You must be using Prism V4.3-dev31 or later.
In order to enable the Prism integration you need to set prism-integration in the ViaVersionStatus config file to true. ViaVersionStatus will write to the log file if it has successfully hooked into Prism.
Here's an example of the Prism lookup results:

Commands
None.
Miscellaneous
This plugin is compatible with ViaVersion, ViaBackwards, and ViaRewind.
This plugin uses the bStats metrics system to provide anonymous usage data. You may opt-out by changing enable-metrics in the ViaVersionStatus config file. The metrics are available at
评论 0
登录后参与评分
还没有评论,来抢沙发吧