HomeJavaModsSimple Voice Chat Music Addon
Simple Voice Chat Music Addon
ModsJava

Simple Voice Chat Music Addon

by rjiangame · on Modrinth

⬇ Download on Modrinth

Music

Music is a server-side Fabric mod that streams URL music through Simple Voice Chat. It is built for shared server music with queues, saved playlists, YouTube playlist import, player targeting, personal opt-out, and YouTube OAuth support through Lavaplayer/youtube-source.

Features

Requirements

This mod controls music on the server, but players only hear it through their Simple Voice Chat connection.

Installation

  1. Install Fabric Loader on the server.
  2. Install Simple Voice Chat on the server.
  3. Install this mod in the server mods folder.
  4. Players who want to hear the stream must install Simple Voice Chat on their clients.
  5. Start the server and run /music help.

Quick Start

/music now
/music play https://www.youtube.com/watch?v=VIDEO_ID 10
/music queue add https://music.youtube.com/watch?v=NEXT_VIDEO_ID
/music queue add https://www.youtube.com/playlist?list=PLAYLIST_ID
/music queue list

If YouTube asks for login or blocks playback, complete the OAuth device login shown in the server log.

How It Works

  1. A player runs /music play, queues a URL, or starts a saved playlist.
  2. Lavaplayer loads the URL.
  3. YouTube links are handled by youtube-source.
  4. The mod sends encoded audio frames into a Simple Voice Chat static audio channel.
  5. Selected listeners hear the same stream.

There is one active global stream per server. Starting a new track with /music play replaces current playback and clears the runtime queue.

YouTube OAuth

YouTube may block automated playback clients. This mod supports YouTube OAuth through youtube-source.

Config file:

config/music.json

Important fields:

{
  "youtubeOAuthEnabled": true,
  "youtubeOAuthRefreshToken": "",
  "youtubeOAuthSkipInitialization": false
}

First login flow:

  1. Start the server.
  2. Run /music play <youtube-url>.
  3. Check the server log for the Google device login code.
  4. Complete the login in a browser.
  5. The refresh token is saved to config/music.json.

The YouTube login is global for the server, not per player. Keep music.json private because it can contain an OAuth refresh token. Using a secondary YouTube account is recommended.

Commands

Run:

/music help
/music help queue
/music help playlist
/music help target
/music help volume

Everyone

/music help
/music now
/music queue list
/music leave
/music join

Playback

All players:

/music play <url>
/music play <url> <volume>
/music stop
/music pause
/music resume
/music skip
/music forward <seconds>
/music backward <seconds>
/music volume <1-100>
/music repeat off
/music repeat one
/music repeat queue
/music shuffle on
/music shuffle off

Behavior:

Queue

All players:

/music queue add <url>
/music queue remove <index>
/music queue clear
/music skip

Everyone can view:

/music queue list

Queue behavior:

Example output:

[Music] Queue:
1. Song Title - Creator Name | 3:22 | requested by PlayerName | added 16:21:05
2. title loading: https://www.youtube.com/watch?v=... | requested by PlayerName

Saved Playlists

All players:

/music playlist list
/music playlist create <name>
/music playlist delete <name>
/music playlist show <name>
/music playlist add <name> <url>
/music playlist remove <name> <index>
/music playlist play <name>
/music playlist queue <name>

Playlist behavior:

Example:

/music playlist create lobby
/music playlist add lobby https://www.youtube.com/watch?v=SONG_1
/music playlist add lobby https://www.youtube.com/playlist?list=PLAYLIST_ID
/music playlist play lobby

Targeting

All players:

/music target all
/music target only <players>
/music target add <players>
/music target remove <players>
/music target show
/music exclude add <players>
/music exclude remove <players>
/music exclude clear

Targeting order:

  1. Connected Simple Voice Chat clients.
  2. Include filter if set.
  3. Exclude filter.
  4. Player personal opt-out from /music leave.

Personal opt-out always wins. /music target all does not force opted-out players to listen.

Examples:

/music target all
/music target only Steve
/music target add Alex
/music exclude add Steve
/music exclude clear

Config Files

Main config:

config/music.json

Stores YouTube OAuth settings, repeat/shuffle settings, target filters, exclusions, and player opt-outs.

Playlist config:

config/music-playlists.json

Stores saved playlist names and track entries.

Example playlist shape:

{
  "playlists": {
    "lobby": [
      {
        "url": "https://www.youtube.com/watch?v=SONG_1",
        "title": "Song Title",
        "creator": "Creator Name",
        "requestedByName": "server",
        "durationMillis": 202000
      }
    ]
  }
}

Use commands instead of editing playlist files while the server is running.

URL Support

Good candidates:

Less reliable:

Unsupported URLs should fail with a chat error instead of crashing the server.

Command Access

All players can use every /music command, including commands that change server playback state:

Self-service and view commands:

Troubleshooting

Music Says Playing, But Nobody Hears It

Run:

/music now
/music target show

Check:

YouTube Says Sign In Or Bot Check

Enable OAuth in config/music.json, restart, then run:

/music play <youtube-url>

Complete the device login shown in the server log. After that, youtubeOAuthRefreshToken should be saved.

Queue Names Show As Loading Or Unknown

Metadata is loaded asynchronously. Wait a few seconds and run:

/music queue list

If metadata still shows unknown, Lavaplayer could not resolve metadata for that URL. The mod will still try to play the URL when its turn starts.

A Player Does Not Hear Music After Target All

Check if the player opted out:

/music target show

The player can rejoin with:

/music join

Personal opt-out has priority over target filters.

Notes

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more