SoundWave 为你的 Paper 服务器添加了基于距离的语音聊天。玩家通过网页浏览器进行对话,因此无需安装任何模组、客户端或独立的语音应用。
在游戏中彼此靠近的玩家能够互相听到声音。当玩家逐渐远离时,声音会逐渐变小,并在相距 33 格时完全消失。根据说话者相对于你面朝方向的位置,声音还会在左声道或右声道之间进行声像定位(panning),从而让你判断出对方来自哪个方向。位于不同世界的玩家无法互相听到声音。
为什么使用 SoundWave
- 玩家无需安装任何东西。 语音聊天在网页上的浏览器中运行。玩家只需打开页面,在游戏中输入一段简短的代码即可连接。
- 兼容任何客户端。 由于玩家不需要模组,SoundWave 适用于原版客户端以及任何启动器。
- 设置简单。 将插件放入你的
plugins 文件夹并启动服务器即可。系统会自动创建一个语音房间,默认使用免费的托管中继服务。
- 丰富的音频选项。 玩家可以选择麦克风、选择降噪模式(DTLN、RNNoise 或关闭)、调整噪声门限、静音自己,并为每位玩家单独设置音量。这些设置会保存在玩家的浏览器中。
- 管理工具。 管理员可以看到哪些玩家连接到了语音,并断开某位玩家的语音会话。
下载前须知
- 需要 Paper。 SoundWave 专为 Paper 26.2 构建,且需要 Java 21。它使用了仅 Paper 支持的功能,因此无法在普通的 Spigot 或 CraftBukkit 上运行。
- 玩家需要浏览器和麦克风。 他们必须在 SoundWave 网页上允许麦克风访问权限。播放期间该网页必须保持打开状态。
- 需要连接到中继服务的互联网连接。 插件使用中继服务来建立语音房间并向网页分享玩家位置。默认情况下,这由我(KohanMathers)运营的一个免费中继提供,但由于托管成本高昂,如果你有此条件,建议自行搭建中继。中继会接收你的房间 ID、在线玩家的名字,以及已链接语音的玩家的位置和朝向数据。语音音频本身直接在玩家浏览器之间传输,不经过中继。
- 你可以自行托管中继。 中继是开源的,基于 Cloudflare Workers 运行。如果你自行托管,请在配置文件中设置其地址。
- 某些网络可能会阻止语音连接。 语音功能直接将玩家的浏览器相互连接。如果中继未配置 TURN 服务器,处于严格限制的学校、工作或移动网络下的玩家可能无法互相听到声音。
玩家如何加入语音
- 在游戏中,运行
/soundwave id 获取服务器的房间 ID。
- 打开 SoundWave 网页(默认中继地址为
https://soundwave.kmathers.co.uk),并输入房间 ID。
- 页面会显示一个 6 位字符的代码。在游戏中,运行
/soundwave link <code>。
- 当浏览器请求麦克风访问权限时,请允许。此时你已进入语音聊天。
要退出语音,运行 /soundwave unlink 或关闭网页。离开服务器也会断开你的语音会话。如果网页失去连接,它有 20 秒的时间尝试重新连接,否则你将被移出语音。
命令
所有玩家可用的命令:
/soundwave id 显示服务器的房间 ID。
/soundwave link <code> 将你的浏览器与游戏中的角色绑定。
/soundwave unlink 断开你的浏览器与语音的连接。
管理员可用的命令:
/soundwave list(或 /soundwave who)显示哪些在线玩家已连接到语音。
/soundwave kick <player> 断开某位玩家的浏览器与语音的连接。
/soundwave status 显示房间 ID、房间开启时长、中继是否可达、TURN 是否已配置,以及已绑定的玩家数量。
/soundwave reload 如果服务器启动时未能连通中继,此命令可尝试重新打开语音房间。无需重启服务器。
权限
soundwave.id 允许玩家使用 /soundwave id。默认情况下所有人都有此权限。
soundwave.link 允许玩家使用 /soundwave link。默认情况下所有人都有此权限。
soundwave.unlink 允许玩家使用 /soundwave unlink。默认情况下所有人都有此权限。
soundwave.list 允许玩家使用 /soundwave list。默认情况下只有管理员有此权限。
soundwave.kick 允许玩家使用 /soundwave kick。默认情况下只有管理员有此权限。
soundwave.status 允许玩家使用 /soundwave status。默认情况下只有管理员有此权限。
soundwave.reload 允许玩家使用 /soundwave reload。默认情况下只有管理员有此权限。
配置
配置文件位于 plugins/SoundWave/config.yml,包含两个选项。
relay-url 是中继的地址。保持原样以使用免费托管的中继,或将其更改为你自己的中继地址。
room-id 是玩家在网页上输入的房间 ID。如果留空,SoundWave 会在服务器首次启动时随机生成一个 ID 并保存至此,这样重启后 ID 保持不变。你也可以使用 3 到 32 个小写字母、数字、连字符或下划线自定义 ID。如果该 ID 已被他人占用,SoundWave 会自动选择一个随机 ID 代替。
当服务器关闭时,语音房间会被关闭,从而断开所有人与语音的连接。
SoundWave adds proximity voice chat to your Paper server. Players talk to each other from a web browser, so nobody needs to install a mod, a client, or a separate voice app.
Players who are close together in-game can hear each other. Voices get quieter as players move apart and fade out completely at 33 blocks. Sound is also panned left or right depending on where the speaker is relative to the way you are facing, so you can tell which direction someone is talking from. Players in different worlds can't hear each other.
Why use SoundWave
- Nothing to install for players. Voice chat runs in the browser on a web page. Players open the page, type a short code in-game, and they're connected.
- Works with any client. Since players don't need a mod, SoundWave works with vanilla clients and any launcher.
- Simple to set up. Drop the plugin into your plugins folder and start the server. A voice room is created automatically, using a free hosted relay by default.
- Good audio options. Players can pick their microphone, choose a noise suppression mode (DTLN, RNNoise, or off), adjust a noise gate, mute themselves, and set a separate volume for each player. These settings are saved in their browser.
- Moderation tools. Operators can see who is connected to voice and disconnect a player's voice session.
Before you download
- Paper is required. SoundWave is built for Paper 26.2 and needs Java 21. It uses Paper-only features, so it will not run on plain Spigot or CraftBukkit.
- Players need a browser and a microphone. They must allow microphone access on the SoundWave web page. The page needs to stay open while they play.
- An internet connection to the relay is required. The plugin uses a relay service to set up voice rooms and share player positions with the web page. By default this is a free relay run by me, KohanMathers, however hosting costs are expensive so if you have the option I would recommend hosting your own. The relay receives your room ID, the names of online players, and the positions and facing direction of players who have linked voice. Voice audio itself goes directly between players' browsers and does not pass through the relay.
- You can host your own relay. The relay is open source and runs on Cloudflare Workers. If you host your own, set its address in the config.
- Some networks may block voice. Voice connects players' browsers directly to each other. Players on strict school, work, or mobile networks may not be able to hear each other if the relay has no TURN server configured.
How players join voice
- In-game, run
/soundwave id to get the server's room ID.
- Open the SoundWave web page (the relay address, which is
https://soundwave.kmathers.co.uk by default) and enter the room ID.
- The page shows a 6-character code. In-game, run
/soundwave link <code>.
- Allow microphone access when the browser asks. You're now in voice chat.
To leave voice, run /soundwave unlink or close the web page. Leaving the server also disconnects your voice session. If the web page loses its connection, it has 20 seconds to reconnect before you are removed from voice.
Commands
Commands for everyone:
/soundwave id shows the server's room ID.
/soundwave link <code> links your browser to your in-game player.
/soundwave unlink disconnects your browser from voice.
Commands for operators:
/soundwave list (or /soundwave who) shows which online players are connected to voice.
/soundwave kick <player> disconnects a player's browser from voice.
/soundwave status shows the room ID, how long the room has been open, whether the relay can be reached, whether TURN is configured, and how many players are linked.
/soundwave reload tries to open the voice room again if the relay couldn't be reached when the server started. You don't need to restart the server.
Permissions
soundwave.id lets players use /soundwave id. Everyone has this by default.
soundwave.link lets players use /soundwave link. Everyone has this by default.
soundwave.unlink lets players use /soundwave unlink. Everyone has this by default.
soundwave.list lets players use /soundwave list. Only operators have this by default.
soundwave.kick lets players use /soundwave kick. Only operators have this by default.
soundwave.status lets players use /soundwave status. Only operators have this by default.
soundwave.reload lets players use /soundwave reload. Only operators have this by default.
Configuration
The config file is at plugins/SoundWave/config.yml and has two options.
relay-url is the address of the relay. Leave it as it is to use the free hosted relay, or change it to the address of your own relay.
room-id is the ID players type on the web page. If you leave it blank, SoundWave picks a random ID the first time the server starts and saves it here, so the ID stays the same after restarts. You can set your own ID using 3 to 32 lowercase letters, numbers, hyphens, or underscores. If someone else is already using that ID, SoundWave picks a random one instead.
The voice room is closed when the server shuts down, which disconnects everyone from voice.
评论 0
登录后参与评分
还没有评论,来抢沙发吧