pv-addon-discs
仅支持 Paper 的 Plasmo Voice 插件。使用音乐唱片在 Minecraft 中播放来自 YouTube 和其他来源的音频。灵感源自 SVC 的 AudioPlayer 与 CustomDiscs。
该插件可以从各种来源流式传输音频,而无需将音频文件保存在服务器上。它甚至支持 YouTube 和 Twitch 直播。这得益于出色的 LavaPlayer 库。
安装
- 安装 Plasmo Voice、PacketEvents 和 pv-addon-lavaplayer-lib。你还需要在客户端安装 Plasmo Voice。
- 从 Modrinth 下载此插件并将其放入
~/plugins文件夹。 - 重启服务器
命令
/disc burn <url> [name] – 根据 URL 创建包含自定义音频的唱片。你需要手中拿着一张音乐唱片。
/disc erase – 将自定义唱片恢复为普通唱片。
/disc search <query> – 搜索 YouTube 上的曲目。
/disc cancel [player] – 取消用户的山羊角播放。你需要 pv.addon.discs.cancel.other 权限才能取消其他玩家的播放。
权限
默认情况下,只有 OP 可以使用以下命令:
pv.addon.discs.burn – Burn 命令
pv.addon.discs.erase – Erase 命令
pv.addon.discs.search – Search 命令
pv.addon.discs.cancel – 取消山羊角播放的命令
pv.addon.discs.cancel.other – 取消其他玩家山羊角播放的命令
pv.addon.discs.burn.burnable_check_bypass – 如果在配置中启用,你只能刻录特殊唱片。此权限允许你绕过此检查
默认所有人可用:
pv.addon.discs.play – 使用自定义音乐唱片
支持的来源
插件可以从以下来源加载音频:
- YouTube 视频和直播(可能需要额外设置,见 常见问题)
- SoundCloud
- Bandcamp
- Vimeo
- Twitch 直播
- 直接 HTTP URL
支持的文件格式
如果你想从直接 URL 流式传输音频:
- MP3
- FLAC
- WAV
- Matroska/WebM (AAC, Opus 或 Vorbis 编解码器)
- MP4/M4A (AAC 编解码器)
- OGG 流 (Opus, Vorbis 和 FLAC 编解码器)
- AAC 流
- 流媒体播放列表 (M3U 和 PLS)
API
Bukkit 事件列表:
Kotlin DSL
repositories {
maven("https://repo.plasmoverse.com/releases")
}
dependencies {
compileOnly("su.plo.voice.addon:discs-paper:$VERSION")
}
常见问题
有问题的 YouTube 播放器脚本
- 确保你使用的是最新版本的
pv-addon-discs和pv-addon-lavaplayer-lib。 - 打开
plugins/pv-addon-discs/discs.toml,取消注释并配置youtube_source.remote_cipher:
这里使用的是 yt-cipher 的公共实例。要托管你自己的实例,请遵循他们的教程。[youtube_source.remote_cipher] url = "https://cipher.kikkia.dev/" password = "" - 重启服务器并查看是否正常工作。
- 如果这不起作用,尝试 oauth2。
使用 YouTube 时出现“登录以确认你不是机器人” / “请登录”
- 确保你使用的是最新版本的
pv-addon-discs和pv-addon-lavaplayer-lib。 - 在
plugins/pv-addon-discs/discs.toml中将youtube_source.use_oauth2设置为true。 - 重启服务器(
/vreload无效)。 - 当
pv-addon-discs初始化时,你会在控制台中看到类似这样的消息(代码会有所不同): 按照控制台消息中的说明操作。 - 授权成功后,你会在控制台中看到一条消息: 你不需要手动保存令牌,它将在服务器停止时自动保存。
- 完成!YouTube 曲目现在应该能正常工作了。
读取超时
这通常意味着你的服务器无法连接到托管曲目的服务器。 检查服务器的互联网连接,如果问题持续存在,请联系你的主机提供商。
如果你有 HTTP 代理,你可以使用 plugins/pv-addon-discs/discs.toml 中的 http_proxy 配置选项进行设置。
此功能仅在 1.1.x 及以上版本中可用。
pv-addon-discs
Paper only Plasmo Voice addon. Play audio from Youtube and other sources in Minecraft using music discs. Inspired by SVC's AudioPlayer & CustomDiscs.
The addon can stream audio from various sources instead of saving audio files on the server. It even supports Youtube and Twitch live streams. Thanks to the brilliant LavaPlayer library.
Installation
- Install Plasmo Voice, PacketEvents and pv-addon-lavaplayer-lib. You also need to install Plasmo Voice on your client.
- Download this plugin from Modrinth and drop it into the
~/pluginsfolder. - Restart the server
Commands
/disc burn <url> [name] – Create a disc with custom audio from the URL. You need to hold a music disc in your hand.
/disc erase – Return a custom disc to a normal one.
/disc search <query> – Search tracks on YouTube.
/disc cancel [player] – Cancel user's goat horn playback. You need pv.addon.discs.cancel.other permission to cancel for others.
Permissions
Commands are only available to OP by default:
pv.addon.discs.burn – Burn command
pv.addon.discs.erase – Erase command
pv.addon.discs.search – Search command
pv.addon.discs.cancel – Command to cancel goat horn playback
pv.addon.discs.cancel.other – Command to cancel goat horn playback for the other player
pv.addon.discs.burn.burnable_check_bypass – If enabled in a config, you can only burn special discs. This permission allows you to bypass this check
Available to everyone by default:
pv.addon.discs.play – Use custom music discs
Supported sources
Addon can load audio from:
- YouTube videos and live streams (could require additional setup, see Common issues)
- SoundCloud
- Bandcamp
- Vimeo
- Twitch live streams
- Direct HTTP URLs
Supported file formats
If you want to stream audio from direct URLs
- MP3
- FLAC
- WAV
- Matroska/WebM (AAC, Opus or Vorbis codecs)
- MP4/M4A (AAC codec)
- OGG streams (Opus, Vorbis and FLAC codecs)
- AAC streams
- Stream playlists (M3U and PLS)
API
Bukkit events list: .
Kotlin DSL
repositories {
maven("https://repo.plasmoverse.com/releases")
}
dependencies {
compileOnly("su.plo.voice.addon:discs-paper:$VERSION")
}
Common issues
Problematic YouTube player script
- Make sure you're using the latest versions of
pv-addon-discsandpv-addon-lavaplayer-lib. - Open
plugins/pv-addon-discs/discs.toml, uncomment and configureyoutube_source.remote_cipher:
This uses a public instance of yt-cipher. To host your own, follow their tutorial.[youtube_source.remote_cipher] url = "https://cipher.kikkia.dev/" password = "" - Restart the server and see if it works.
- If this doesn't work, try oauth2.
"Sign in to confirm you're not a bot" / "Please sign in" using YouTube
- Make sure you're using the latest versions of
pv-addon-discsandpv-addon-lavaplayer-lib. - Set
youtube_source.use_oauth2totrueinplugins/pv-addon-discs/discs.toml. - Restart the server (
/vreloadwill not work). - When
pv-addon-discsinitializes, you'll see a message in your console like this (code will be different): Follow the instructions in the console message. - After successful authorization, you'll see a message in your console: You don't need to save token manually, it will be saved when the server is stopped.
- Done! YouTube tracks should now work as expected.
Read timed out
This usually means that your server can't reach the server hosting the track. Check your server's internet connection and contact your hosting provider if the issue persists.
If you have HTTP proxy, you can set it using http_proxy config option in plugins/pv-addon-discs/discs.toml.
This feature is only available starting from 1.1.x.
下载 pv-addon-discs
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 pv-addon-discs
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 pv-addon-discs
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 pv-addon-discs
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 pv-addon-discs
下载 pv-addon-discs
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 pv-addon-discs
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 pv-addon-discs
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 pv-addon-discs
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 pv-addon-discs
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
- 新增对
26.3的支持。 - 当配置中启用
debug时,LavaPlayer 的调试日志现在会记录到服务器日志文件中。 - 修复了在
1.21.5+版本中使用/disc erase命令处理山羊角后未恢复原版工具提示的问题。 - 修复了播放唱片或山羊角期间服务器关闭时出现的“zip file closed”错误。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
自定义你的Minecraft头像!
插件
一个高度兼容、功能完善且稳定的 TPA 模组
插件
专为 Velocity 打造的自制聊天插件,功能丰富——支持跨服群组/全局/私聊消息,并集成 LibertyBans 的禁言功能。
插件
允许基岩版(Geyser)玩家使用自定义铁砧和锻造台配方。
插件
一个现代且高度可配置的 Essentials 插件,类似于 EssentialsX
插件
适用于旧版版本的近距离语音聊天
评论 0
登录后参与评分
还没有评论,来抢沙发吧