Сделай плагин на 26.2 paper 25, который будет запускать музыку по ссылке в форматах mp3, ogg и mp4. Команды: /nmusic load <ссылка на видео или музыку(так же можно загрузить в папку nmusics)> /nmusic stop, /nmusic play. Название плагина: nMusic
KodariJul 24 at 3:27 pm 3
I’ll build the nMusic plugin — a Paper plugin that plays music from URLs (mp3, ogg, mp4) with commands for loading, playing, and stopping music.
nMusic
A Paper plugin for playing music from URLs in mp3, ogg, and mp4 formats. Players can load music via links or from the local nmusics folder. Includes /nmusic load to download and prepare audio, /nmusic play to start playback, and /nmusic stop to halt. Uses dynamic resource pack generation with a built-in HTTP server to deliver custom sounds to players without external dependencies.
Let me plan the architecture:
nMusic — main plugin class, registers command, starts/stops HTTP server
MusicManager — manages loaded music state, handles play/stop logic
AudioConverter — converts mp3/mp4 to ogg format for Minecraft resource packs
ResourcePackServer — built-in HTTP server to serve generated resource packs
A Paper plugin that plays music from URLs and local files in Minecraft. Supports mp3, ogg, and mp4 formats. Features include downloading music from URLs, converting audio to OGG format via ffmpeg, generating dynamic resource packs with an embedded HTTP server, and playing music through Minecraft's resource pack sound system. Commands: /nmusic load, /nmusic play, /nmusic stop.
I’ll create the nMusic plugin — a Paper plugin that downloads, converts, and plays music via Minecraft’s resource pack system.
Architecture:
nMusic — main plugin class, starts HTTP server, registers commands
MusicManager — tracks loaded music and player playback state
MusicCommand — /nmusic handler with load/play/stop subcommands
AudioConverter — downloads URLs, converts mp3/mp4 to ogg via ffmpeg
ResourcePackServer — embedded HTTP server that serves generated resource pack zips
I’ll create the nMusic plugin — a Paper plugin that downloads music/video from URLs, converts to ogg, and plays via Minecraft’s resource pack system.
A Paper plugin that plays music from external URLs in mp3, ogg, and mp4 formats using Minecraft's resource pack system. Features include loading music from direct URLs or the nmusics folder, converting audio to ogg format via ffmpeg, built-in HTTP server for serving resource packs, and commands for loading, playing, and stopping music. Supports multiple players with different music tracks simultaneously.
Let me create all filesI’ll build the nMusic plugin — a Paper plugin that downloads music/video from URLs (mp3, ogg, mp4), converts to ogg, and plays via Minecraft’s resource pack system.
A Paper plugin that plays music from URLs in Minecraft. Supports mp3, ogg, and mp4 formats. Features include loading music from URLs or the nmusics folder, built-in HTTP server for resource pack delivery, automatic audio conversion via ffmpeg/yt-dlp, and per-player music playback with stop/play controls. Commands: /nmusic load, /nmusic play, /nmusic stop, /nmusic list.
Now creating all files:
The plugin is complete. Here’s a summary of the architecture:
nMusic — a Paper plugin that plays music/video from URLs in Minecraft
Files created (8 total):
File
Purpose
build.gradle
Paper API 1.21.4, Java 21
plugin.yml
Command registration,
/nmusic
aliased to
/nm
config.yml
HTTP server port (8192) and IP
nMusic.java
Main class, event listener for resource pack status
MusicManager.java
Tracks loaded music, per-player playback state
MusicCommand.java
Handles
load
,
play
,
stop
,
list
subcommands
AudioConverter.java
Downloads URLs (yt-dlp → direct fallback), converts to ogg via ffmpeg