需要安装 [Simple Voice Chat](https://modrinth.com/plugin/simple-voice-chat)。  ## 需要了解的内容 此模组必须同时在服务器和客户端上安装才能工作。如果玩家没有安装此模组,他们将看不到语音消息。
此模组使用 Simple Voice Chat 中配置的麦克风以及所有设置。因此,请确保 Simple Voice Chat 设置中的 `语音放大` 未设置为 `-100%`。
此外,如果语音聊天声音被禁用,您将无法听到语音消息。 ## 私人语音消息 您可以使用 `/voicemsg <目标>` 或 `/vmsg <目标>` 命令向玩家或您的团队发送私人语音消息。
请注意,服务器可以通过权限限制您发送它们。  ## 服务器设置 ### 配置 服务器配置位于 `config/voicemessages_server.json`
以下是默认值及其描述:
``` { "max_voice_message_duration_ms": 90000, // 语音消息的最大长度(毫秒),范围为 [3_000;300_000] "voice_message_spam_punishment": "none", // 对于发送的语音消息长度超过自上次发送以来经过的时间的惩罚。可能的值: "none", "prevent", "kick" "voice_message_invalid_punishment": "prevent", // 对于发送无效语音消息(超过最大配置长度)或对于没有发送权限的语音消息的惩罚。可能的值: "none", "prevent", "kick" "mod_required": false, // 如果为 true,则如果玩家没有安装此模组,则会被踢出 "mod_not_installed_text": "VoiceMessages 未安装或为旧版本" // 对于没有安装此模组的玩家的踢出信息 } ``` ### 权限 - `voicemessages.send` - 允许发送语音消息的权限。默认: `true` - `voicemessages.send.all` - 允许向全局聊天发送语音消息的权限。默认: `true` - `voicemessages.send.team` - 允许向玩家的队伍发送私人语音消息的权限。默认: `true` - `voicemessages.send.players` - 允许向玩家发送私人语音消息的权限。默认: `true` ## API 此模组有自己的 API。
在 `build.gradle` 中设置: ``` repositories { // 其他仓库 maven { name "KvotheShaed Releases" url "https://maven.kvotheshaed.ru/releases" } } dependencies { // 其他依赖 // Voice Messages API compileOnly "ru.dimaskama.voicemessages:voicemessages-api:${voicemessages_api_version}" } ```