Sonar
Sonar 是一个配合 ffmpeg、ffprobe 和 Simple Voice Chat 使用的插件,旨在 Minecraft 内打造类似 Spotify 的 MP3 播放器体验。该插件支持显示歌曲标题、封面、时长、音量控制、播放队列,以及最酷的功能——实时歌词。
重要提示:
- 此插件对资源消耗相对较高。它使用 ffmpeg 主动读取 MP3 文件并将其转换为 Simple Voice Chat 可识别的格式。建议配备独立显卡(GPU)或性能强劲的服务器。
- 并非所有托管服务商都兼容。在拥有服务器管理权限且可自行配置的服务器上最有可能正常运行。如果您发现某些服务器主机不支持此插件,请通过 Discord 联系我 ()
版权声明:播放歌曲的服务器需自行负责核查所播放内容是否涉及版权材料,而非 Sonar 的责任。
待办事项
- 在数据库中缓存歌曲信息
- 添加歌曲播放/暂停功能
- 进一步优化性能
安装方法
将插件安装至您的服务器并重启
检查控制台输出,应包含类似以下内容:
[11:14:38 INFO]: [Sonar] Machine OS: Windows 11, Version: 10.0, Arch: amd64
如果您使用的是 Linux 系统:
- 导航至 Sonar 插件的 ffmpeg 文件夹 (
/plugins/Sonar/ffmpeg/)
- 将 zip 压缩包内的文件放入 ffmpeg 文件夹中 (点击此处下载 zip)
重启服务器,如果控制台无报错,即可正常使用。
如果您使用的是 Windows/macOS 系统:
- 确保已安装 ffmpeg
重启服务器
设置完成后:
- 将 MP3 文件(建议来自 Spotify 下载器)放入
/plugins/Sonar/songs 目录
- 执行重启(推荐)或运行
/sonar reload 命令,即可开始使用 Sonar!
如何创建唱片机:
执行 /sonar create <id> 并将 <id> 替换为您的 ID。音频将从您执行命令的位置播放。您可以在创建位置周围 5 格半径内放置多个唱片机,但音频仅会从您创建唱片机的位置播放。
若要编辑不同设置,请运行 /sonar settings <id>(例如 /sonar settings test),将会弹出一个用户界面。
目前生存模式尚无法直接创建此物品,我可能会在未来的版本中添加合成配方。
发现 Bug?
请在 Discord 上联系我 (blue_bed) 或加入我的 Discord 服务器
Sonar
Sonar is a plugin that works with ffmpeg, ffprobe and Simple Voice Chat to create a spotify-esque mp3 player inside of Minecraft. This plugin includes song titles, covers, duration, volume control, queues, and coolest of all - live lyrics.
IMPORTANT NOTES:
- This plugin is relatively demanding in terms of resources. It uses ffmpeg which is actively reading the mp3 files and turning it into something Simple Voice Chat can understand. It is recommended to have a GPU or a strong server.
- This may not work on all hosts. It is most likely to work on servers where you own the machine as you are able to configure it. If you find a server host which this doesn't work on, contact me on discord ()
Copyright Notice: All servers playing songs claim the responsibility of checking for any copyrighted material being played, not Sonar.
To Do List
- Cache song information in a database
- Add play/pause for songs
- Optimise better
How to Install
Install the plugin on your server and restart
Check the console for something along the lines of:
[11:14:38 INFO]: [Sonar] Machine OS: Windows 11, Version: 10.0, Arch: amd64
If you are on a Linux system:
- Navigate to the ffmpeg Sonar plugin folder (
/plugins/Sonar/ffmpeg/)
- Put the files inside of the zip folder into the ffmpeg folder (zip here)
Restart the server, if you see no errors in console it should work
If you are on Windows/macOS:
- Ensure you have ffmpeg installed
Restart the server
After Setup:
- Put mp3 files (preferably from a spotify downloader) into
/plugins/Sonar/songs
- Either restart (preferred) or do
/sonar reload and you will be able to use sonar!
How to create a Jukebox:
Execute /sonar create <id> and replace <id> with your id. The place where you do the command will be where the audio plays from. you can have multiple jukeboxes within a 5 block radius of place where you created it but it will only play from where you created the jukebox.
To edit different settings, do /sonar settings <id> (such as /sonar settings test) and a UI will pop up.
There is currently no way to create this in survival, I may add a crafting recipe in the future.
Found bugs?
Let me know on Discord (blue_bed) or in my discord server
评论 0
登录后参与评分
还没有评论,来抢沙发吧