VoiceChatAddon
VoiceChatAddon 通过双向近距离语音桥接,将使用 Simple Voice Chat 和 Plasmo Voice 的玩家连接起来。
玩家可以使用任意一种支持的客户端模组,并仍能听到使用另一种模组的附近玩家。该插件还提供语音客户端检测、一次性奖励、PlaceholderAPI 状态与计数器、SQLite/MySQL 存储、LiteBans 静音同步以及可配置的 MiniMessage 动作。
此桥接仅连接近距离语音。它不会合并 Simple Voice Chat 和 Plasmo Voice 之间的私人群组或频道。
功能
- 双向 Simple Voice Chat ↔ Plasmo Voice 近距离桥接
- 无需额外的 VoiceChatAddon 客户端模组
- 玩家只需安装一种受支持的语音模组即可
- 保留双向的说话距离
- 支持 Simple Voice Chat 耳语距离
- 桥接距离限制在 1–128 格之间
- 双模组客户端的重复音频保护
- 独立的 Simple 和 Plasmo 客户端检测
- 可配置的
ANY、BOTH、SIMPLE 和 PLASMO 奖励模式
- 针对 Simple、Plasmo 和双模组玩家的独立奖励动作
- 一次性奖励领取
- 可选的基于 IP 的副账号防护
- SQLite 和 MySQL 存储支持
- 标准及关系型 PlaceholderAPI 占位符
- 在线语音用户计数器
- 可配置的 MiniMessage 状态图标
- 可选的 LiteBans 静音同步
- 可配置的动作和静音通知冷却时间
- 可选的 Vault 经济动作
- 配置文件重载命令
- 详细的每位玩家调试报告
工作原理
在同一后端服务器上安装 Paper 版本的 Simple Voice Chat 和 Plasmo Voice,并在 config.yml 中启用这两个系统。
- 附近的 Plasmo Voice 玩家可以听到 Simple Voice Chat 玩家的声音。
- 附近的 Simple Voice Chat 玩家可以听到 Plasmo Voice 玩家的声音。
- 使用相同语音模组的玩家继续通过其原有的语音系统进行通信。
玩家不需要同时安装两个客户端模组。每位玩家都可以使用自己偏好的受支持语音模组。
语音桥接
桥接在两个方向中继编码语音帧:
Simple Voice Chat -> Plasmo Voice
Plasmo Voice -> Simple Voice Chat
语音帧在不进行额外解码和重新编码步骤的情况下直接转发。
当满足以下条件时启用桥接:
- 已安装并初始化 Simple Voice Chat
- 已安装并初始化 Plasmo Voice
settings.voiceChats 中同时列出了 SIMPLE 和 PLASMO
settings.bridgeVoiceChats 为 true
- Plasmo Voice 的
proximity 行及激活可用
settings:
voiceChats:
- PLASMO
- SIMPLE
bridgeVoiceChats: true
距离
对于 Simple Voice Chat 说话者,桥接使用服务器配置的语音距离。耳语时使用约 33% 的距离。
对于 Plasmo Voice 说话者,保留活动 proximity 数据包中的距离。
最终桥接距离被限制在 1 到 128 格之间。
重复保护
如果说话者同时拥有两种受支持的语音模组,VoiceChatAddon 不会通过桥接中继该说话者的声音。
对于已通过源语音模组接收原始流听的听众,桥接音频也会被过滤,以防止重复播放和回声。
语音检测与奖励
玩家可以使用以下命令领取配置的奖励:
/voice
插件会检查玩家可用的语音客户端,并执行匹配的动作用列表。
可用的奖励部分:
actions.reward
actions.reward_simple
actions.reward_plasmo
actions.install
actions.noPermsReward
- 当检测到两种语音模组时,使用
reward。
- 对于 Simple Voice Chat,使用
reward_simple。
- 对于 Plasmo Voice,使用
reward_plasmo。
- 当未满足配置的奖励条件时,使用
install。
奖励模式
| 模式 |
所需的客户端语音聊天 |
ANY |
Simple Voice Chat 或 Plasmo Voice |
BOTH |
两种语音模组 |
SIMPLE |
Simple Voice Chat |
PLASMO |
Plasmo Voice |
settings:
mode: ANY
一次性领取与反滥用
每次成功领取都会记录玩家的 UUID、名称、IP 地址和领取时间。
- 每个 UUID 只能领取一次。
- 当
antiIPAbuse: true 时,使用已被领取 IP 的不同 UUID 也会被阻止。
settings:
antiIPAbuse: true
如果多个合法玩家共享同一个网络,或者你的代理未能正确转发真实玩家地址,请禁用 IP 保护。
存储
支持的存储类型:
SQLITE
MYSQL
默认启用 SQLite,并将领取记录存储在:
plugins/voicechat-addon/storage.db
MySQL 示例:
settings:
database:
type: MYSQL
mysql:
host: "127.0.0.1"
port: 3306
database: "voicechat_addon"
username: "root"
password: ""
数据库连接通过 HikariCP 管理。
更改存储类型或数据库凭据需要完全重启服务器。
LiteBans 集成
当安装 LiteBans 时,VoiceChatAddon 会在接受传出语音数据包之前检查玩家的活跃静音状态。
被静音的玩家无法通过以下方式说话:
- Simple Voice Chat
- Plasmo Voice
- 跨模组桥接
传入语音不会被阻止;集成仅防止被静音的玩家发送语音。
当被静音的玩家尝试说话时,将执行 actions.muted。动作冷却时间以毫秒为单位配置:
settings:
mutedActionCooldown: 30000
静音结果会被短暂缓存,以避免为每个音频数据包查询 LiteBans 数据库。
PlaceholderAPI
PlaceholderAPI 是必需的依赖项。
| 占位符 |
结果 |
%voicechataddon_voice% |
玩家配置好的语音状态图标 |
%voicechataddon_voice_total% |
至少配置了一个语音模组的在线玩家数量 |
%voicechataddon_voice_simple% |
Simple Voice Chat 的在线用户数量 |
%voicechataddon_voice_plasmo% |
Plasmo Voice 的在线用户数量 |
%rel_voicechataddon_voice% |
查看者是否能听到目标玩家 |
关系型占位符返回以下三个可配置的值之一:
available — 查看者和目标玩家共享同一个语音模组,或当前激活的桥梁连接了二者
incompatible — 目标玩家拥有语音聊天功能,但查看者无法收听该语音系统
unavailable — 目标玩家未配置任何已设置的语音模组
settings:
voicePlaceholder:
available: "<#10FA20>●"
incompatible: "<#FA8B10>●"
unavailable: "<#EA0909>●"
这些值使用 MiniMessage 格式。语音状态计数器会在语音状态变更时刷新,并定期同步更新。
操作
奖励、安装提示、静音反馈、错误提示和重载消息均配置为操作列表。
支持的操作类型:
[MESSAGE]
[BROADCAST]
[CONSOLE]
[PLAYER]
[SOUND]
[TITLE]
[ACTIONBAR]
[BOSSBAR]
[PARTICLE]
[FIREWORK]
[EFFECT]
[VAULT]
[CLOSE]
内置占位符:
{prefix}
{player}
PlaceholderAPI 的值也可用于操作文本和命令中。
actions:
reward_simple:
- "[MESSAGE] {prefix} 已领取 Simple Voice Chat 奖励"
- "[SOUND] sound:ENTITY_EXPERIENCE_ORB_PICKUP && volume:1.0 && pitch:1.2"
- "[CONSOLE] give {player} diamond 3"
install:
- "[MESSAGE] {prefix} 请安装任意一个受支持的语音模组"
muted:
- "[ACTIONBAR] <red>你已被静音,无法说话 && ticks:100 && updating:false"
[VAULT] 操作需要安装 Vault 插件并注册一个经济提供商。
配置
主配置文件:
plugins/voicechat-addon/config.yml
核心设置:
settings:
prefix: "<#FDBE00><bold>SERVER</bold><gray>:<white>"
antiIPAbuse: true
voiceChats:
- PLASMO
- SIMPLE
bridgeVoiceChats: true
mode: ANY
mutedActionCooldown: 30000
database:
type: SQLITE
修改常规设置或操作后,请使用 /voice reload 进行重载。修改数据库设置后,请重启服务器。
命令
| 命令 |
描述 |
/voice |
检查玩家的语音模组并处理一次性奖励 |
/voice reload |
重载配置、桥梁状态和缓存的语音状态 |
/voicechataddon <player> |
显示特定在线玩家的详细调试报告 |
/voice 仅限玩家使用。调试命令会报告检测到的客户端、API 状态、桥接就绪情况、连接详情以及观众兼容性。
权限
| 权限 |
描述 |
默认值 |
voicechat.addon.reload |
允许使用 /voice reload |
OP |
voicechat.addon.debug |
允许使用 /voicechataddon <player> |
OP |
普通的 /voice 奖励命令不需要任何权限。
要求
- Java 21 或更高版本
- Minecraft 1.21.x
- Paper 1.21.x 或其兼容的基于 Paper 的分叉版本
- PlaceholderAPI
- Simple Voice Chat 和/或 Plasmo Voice
对于跨模组桥接,两个语音插件必须安装在同一个后端服务器上。
可选:
- LiteBans —— 在玩家被禁言时阻止发出语音
- Vault 和经济类插件 —— 启用
[VAULT] 动作
VoiceChatAddon 基于 Simple Voice Chat 2.6.21、Plasmo Voice Paper 2.1.14、PlaceholderAPI 2.12.3 和 LiteBans 2.19.0 构建。这些是编译时的 API 版本,并不承诺只能使用完全相同的版本。
安装
- 在后端服务器上安装 PlaceholderAPI。
- 安装 Simple Voice Chat、Plasmo Voice 的 Paper 版本,或两者都安装。
- 根据各插件文档配置每个语音插件的 UDP 端口和网络设置。
- 将
VoiceChatAddon.jar 放入后端服务器的 plugins 文件夹中。
- 如果需要集成 LiteBans 和/或 Vault,请安装它们。
- 启动或重启服务器。
- 打开
plugins/voicechat-addon/config.yml。
- 配置语音系统、奖励模式、存储和操作。
- 重启服务器,或对支持的配置更改使用
/voice reload。
在 Velocity 网络中,VoiceChatAddon 仍需安装在所有需要其功能的 Paper 后端服务器上。它不是一个 Velocity 插件。
注意事项
- 该桥接器仅连接当前后端的玩家;它不会在后端服务器之间转发音频。
- 桥接器需要同时安装服务端语音插件,但每位玩家只需安装一个客户端模组。
- 仅提供跨模组的近距离语音功能。两个模组之间的私人群组和频道不会合并。
- VoiceChatAddon 不会开放端口、合并 UDP 传输或配置防火墙。
- 奖励领取是永久性的,且每个 UUID 仅限领取一次。
- IP 地址会随奖励领取记录一起存储。如果不希望进行基于 IP 的封禁,请禁用
antiIPAbuse。
- 在使用代理时启用 IP 保护功能,必须正确配置真实 IP 转发。
- 玩家在可以使用
/voice 命令之前,需审查捆绑的奖励操作;其中包含的控制台命令仅为针对特定服务器的示例。
- 奖励执行前会先存储领取记录,因此失败的奖励命令不会自动允许再次领取。
- 更改数据库类型和凭据需要完全重启服务器。
- 未声明支持 Folia。
致谢
Voice bridge 逻辑改编自 PfauMC/voice-bridge,遵循 MIT 许可证。
VoiceChatAddon
VoiceChatAddon connects players using Simple Voice Chat and Plasmo Voice through a bidirectional proximity voice bridge.
Players can use either supported client mod and still hear nearby players using the other one. The plugin also provides voice-client detection, one-time rewards, PlaceholderAPI statuses and counters, SQLite/MySQL storage, LiteBans mute synchronization and configurable MiniMessage actions.
The bridge connects proximity voice only. It does not merge private groups or channels between Simple Voice Chat and Plasmo Voice.
Features
- Bidirectional Simple Voice Chat ↔ Plasmo Voice proximity bridge
- No additional VoiceChatAddon client mod required
- Players only need one supported voice mod
- Preserved speaking distance in both directions
- Simple Voice Chat whisper-distance support
- Bridged distance clamped to 1–128 blocks
- Duplicate audio protection for dual-mod clients
- Independent Simple and Plasmo client detection
- Configurable
ANY, BOTH, SIMPLE and PLASMO reward modes
- Separate reward actions for Simple, Plasmo and dual-mod players
- One-time reward claims
- Optional IP-based alt-account protection
- SQLite and MySQL storage
- Standard and relational PlaceholderAPI placeholders
- Online voice-user counters
- Configurable MiniMessage status icons
- Optional LiteBans mute synchronization
- Configurable actions and muted notification cooldown
- Optional Vault economy actions
- Configuration reload command
- Detailed per-player debug report
How It Works
Install the Paper versions of Simple Voice Chat and Plasmo Voice on the same backend server and enable both systems in config.yml.
- A Simple Voice Chat player can be heard by nearby Plasmo Voice players.
- A Plasmo Voice player can be heard by nearby Simple Voice Chat players.
- Players using the same voice mod continue to communicate through their original voice system.
Players do not need both client mods. Each player can use their preferred supported voice mod.
Voice Bridge
The bridge relays encoded voice frames in both directions:
Simple Voice Chat -> Plasmo Voice
Plasmo Voice -> Simple Voice Chat
The voice frames are forwarded without an additional decode-and-reencode step.
The bridge is enabled when:
- Simple Voice Chat is installed and initialized
- Plasmo Voice is installed and initialized
SIMPLE and PLASMO are both listed in settings.voiceChats
settings.bridgeVoiceChats is true
- the Plasmo Voice
proximity line and activation are available
settings:
voiceChats:
- PLASMO
- SIMPLE
bridgeVoiceChats: true
Distance
For Simple Voice Chat speakers, the bridge uses the server's configured voice distance. Whispering uses approximately 33% of that distance.
For Plasmo Voice speakers, the distance from the active proximity packet is preserved.
The final bridged distance is clamped between 1 and 128 blocks.
Duplicate Protection
If a speaker has both supported voice mods, VoiceChatAddon does not relay that speaker through the bridge.
Bridged audio is also filtered for listeners who already receive the original stream through the source voice mod. This prevents duplicate playback and echo.
Voice Detection and Rewards
Players can claim a configured reward with:
/voice
The plugin checks the player's available voice clients and executes the matching action list.
Available reward sections:
actions.reward
actions.reward_simple
actions.reward_plasmo
actions.install
actions.noPermsReward
reward is used when both voice mods are detected.
reward_simple is used for Simple Voice Chat.
reward_plasmo is used for Plasmo Voice.
install is used when the configured reward condition is not met.
Reward Modes
| Mode |
Required client voice chat |
ANY |
Simple Voice Chat or Plasmo Voice |
BOTH |
Both voice mods |
SIMPLE |
Simple Voice Chat |
PLASMO |
Plasmo Voice |
settings:
mode: ANY
One-Time Claims and Anti-Abuse
Every successful claim is stored with the player's UUID, name, IP address and claim time.
- Each UUID can claim once.
- With
antiIPAbuse: true, a different UUID using an already claimed IP address is also blocked.
settings:
antiIPAbuse: true
Disable IP protection if several legitimate players share one network or if your proxy does not forward real player addresses correctly.
Storage
Supported storage types:
SQLITE
MYSQL
SQLite is enabled by default and stores claims in:
plugins/voicechat-addon/storage.db
MySQL example:
settings:
database:
type: MYSQL
mysql:
host: "127.0.0.1"
port: 3306
database: "voicechat_addon"
username: "root"
password: ""
Database connections are managed through HikariCP.
Changing the storage type or database credentials requires a full server restart.
LiteBans Integration
When LiteBans is installed, VoiceChatAddon checks the player's active mute before accepting outgoing voice packets.
Muted players cannot speak through:
- Simple Voice Chat
- Plasmo Voice
- the cross-mod bridge
Incoming voice is not blocked; the integration only prevents the muted player from transmitting.
When a muted player attempts to speak, actions.muted is executed. The action cooldown is configured in milliseconds:
settings:
mutedActionCooldown: 30000
Mute results are cached briefly to avoid querying the LiteBans database for every audio packet.
PlaceholderAPI
PlaceholderAPI is a required dependency.
| Placeholder |
Result |
%voicechataddon_voice% |
Configured voice status icon for the player |
%voicechataddon_voice_total% |
Online players with at least one configured voice mod |
%voicechataddon_voice_simple% |
Online Simple Voice Chat users |
%voicechataddon_voice_plasmo% |
Online Plasmo Voice users |
%rel_voicechataddon_voice% |
Whether the viewer can hear the target player |
The relational placeholder returns one of three configurable values:
available — viewer and target share a voice mod, or the active bridge connects them
incompatible — target has voice chat, but the viewer cannot hear that voice system
unavailable — target has none of the configured voice mods
settings:
voicePlaceholder:
available: "<#10FA20>●"
incompatible: "<#FA8B10>●"
unavailable: "<#EA0909>●"
The values use MiniMessage formatting. Voice status counters are refreshed on voice-state changes and periodically reconciled.
Actions
Rewards, install prompts, mute feedback, errors and reload messages are configured as action lists.
Supported action types:
[MESSAGE]
[BROADCAST]
[CONSOLE]
[PLAYER]
[SOUND]
[TITLE]
[ACTIONBAR]
[BOSSBAR]
[PARTICLE]
[FIREWORK]
[EFFECT]
[VAULT]
[CLOSE]
Built-in placeholders:
{prefix}
{player}
PlaceholderAPI values can also be used in action text and commands.
actions:
reward_simple:
- "[MESSAGE] {prefix} Reward claimed for Simple Voice Chat"
- "[SOUND] sound:ENTITY_EXPERIENCE_ORB_PICKUP && volume:1.0 && pitch:1.2"
- "[CONSOLE] give {player} diamond 3"
install:
- "[MESSAGE] {prefix} Install one of the supported voice mods"
muted:
- "[ACTIONBAR] <red>You are muted and cannot speak && ticks:100 && updating:false"
[VAULT] actions require Vault and a registered economy provider.
Configuration
Main configuration file:
plugins/voicechat-addon/config.yml
Core settings:
settings:
prefix: "<#FDBE00><bold>SERVER</bold><gray>:<white>"
antiIPAbuse: true
voiceChats:
- PLASMO
- SIMPLE
bridgeVoiceChats: true
mode: ANY
mutedActionCooldown: 30000
database:
type: SQLITE
Use /voice reload after changing normal settings or actions. Restart the server after changing database settings.
Commands
| Command |
Description |
/voice |
Checks the player's voice mod and processes the one-time reward |
/voice reload |
Reloads configuration, bridge state and cached voice statuses |
/voicechataddon <player> |
Displays a detailed debug report for an exact online player |
/voice is player-only. The debug command reports detected clients, API state, bridge readiness, connection details and viewer compatibility.
Permissions
| Permission |
Description |
Default |
voicechat.addon.reload |
Allows /voice reload |
OP |
voicechat.addon.debug |
Allows /voicechataddon <player> |
OP |
The normal /voice reward command does not require a permission.
Requirements
- Java 21 or newer
- Minecraft 1.21.x
- Paper 1.21.x or a compatible Paper-based fork
- PlaceholderAPI
- Simple Voice Chat and/or Plasmo Voice
For cross-mod bridging, both voice plugins must be installed on the same backend server.
Optional:
- LiteBans — blocks outgoing voice while a player is muted
- Vault and an economy plugin — enables
[VAULT] actions
VoiceChatAddon is built against Simple Voice Chat 2.6.21, Plasmo Voice Paper 2.1.14, PlaceholderAPI 2.12.3 and LiteBans 2.19.0. These are build-time API versions, not a promise that only those exact versions can be used.
Installation
- Install PlaceholderAPI on the backend server.
- Install the Paper version of Simple Voice Chat, Plasmo Voice, or both.
- Configure each voice plugin's UDP port and networking according to its documentation.
- Place
VoiceChatAddon.jar into the backend server's plugins folder.
- Install LiteBans and/or Vault if their integrations are needed.
- Start or restart the server.
- Open
plugins/voicechat-addon/config.yml.
- Configure voice systems, reward mode, storage and actions.
- Restart the server, or use
/voice reload for supported configuration changes.
In a Velocity network, VoiceChatAddon still belongs on every Paper backend where its features are needed. It is not a Velocity plugin.
Notes
- The bridge connects players on the current backend only; it does not relay audio between backend servers.
- Both server-side voice plugins are required for the bridge, but each player only needs one client mod.
- Only cross-mod proximity voice is provided. Private groups and channels are not merged between the two mods.
- VoiceChatAddon does not open ports, merge UDP transports or configure the firewall.
- Reward claims are permanent and limited to one claim per UUID.
- IP addresses are stored with reward claims. Disable
antiIPAbuse if IP-based blocking is not wanted.
- Correct real-IP forwarding is required when IP protection is used behind a proxy.
- Review the bundled reward actions before players can use
/voice; the included console commands are server-specific examples.
- A claim is stored before reward actions run, so failed reward commands do not automatically allow another claim.
- Database type and credential changes require a full restart.
- Folia support is not declared.
Credits
Voice bridge logic is adapted from PfauMC/voice-bridge under the MIT License.
评论 0
登录后参与评分
还没有评论,来抢沙发吧