DaveTriangle1

Make me a minecraft plugin where you can upload your own mp3 file and be able to play it on a jukebox

Kodari AI
KodariJun 8 at 7:03 am 11

I’ll create a custom jukebox music plugin that allows players to register MP3 files and play them on jukeboxes.

CustomJukeboxMusic
A plugin that enables players to upload and play custom MP3 music on jukeboxes. Players can register music via URLs, create custom music discs, and select from their collection through an interactive GUI. Features include per-player music libraries, jukebox interaction handling, volume control, and admin moderation tools. Supports resource pack integration for seamless audio playback.

[Generation stopped]

DaveTriangle1

Make it for 1.21.11 please

Kodari AI
KodariJun 8 at 7:05 am 12

I’ll create a custom jukebox music plugin for Minecraft 1.21.1 that lets players register MP3 files via URL and play them on jukeboxes.


Custom Jukebox Music Plugin Created! 🎵

Your plugin is ready for Minecraft 1.21.1! Here’s how it works:

Features:

  • Players can register MP3 files via direct URL

  • Interactive GUI to select and play music

  • Right-click jukeboxes while sneaking to open the music selection menu

  • Configurable music range, volume, and track limits

  • Admin commands for moderation

  • Persistent storage of all music tracks

Commands:

  • /music add <name> <mp3-url> - Add a music track

  • /music list - View your tracks

  • /music remove <name> - Remove a track

  • /music gui - Open music selection GUI

  • /musicadmin reload - Reload config

  • /musicadmin list <player> - View player’s tracks

  • /musicadmin remove <player> <name> - Remove a player’s track

How to Use:

  1. Add music: /music add MySong https://example.com/song.mp3

  2. Find a jukebox and shift + right-click it

  3. Select your track from the GUI

  4. Music plays for all nearby players!

Note:

The MP3 files must be hosted on a publicly accessible URL (like Dropbox, Google Drive with direct links, or your own web server). The actual audio playback would require a resource pack or client-side mod for full custom audio - this plugin provides the framework for managing and triggering the music system!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
11 817
src/main/java/com/customjukebox/CustomJukeboxPlugin.java
package com.customjukebox;

import com.customjukebox.commands.MusicAdminCommand;
import com.customjukebox.commands.MusicCommand;
import com.customjukebox.listeners.JukeboxListener;
import com.customjukebox.managers.ConfigManager;
import com.customjukebox.managers.MusicManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class CustomJukeboxPlugin extends JavaPlugin {
    
    private ConfigManager configManager;
    private MusicManager musicManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.musicManager = new MusicManager(this);
        
        getCommand("music").setExecutor(new MusicCommand(this));
        getCommand("musicadmin").setExecutor(new MusicAdminCommand(this));
        
        getServer().getPluginManager().registerEvents(new JukeboxListener(this), this);
        
        getLogger().info("CustomJukeboxMusic has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (musicManager != null) {
            musicManager.stopAllMusic();
            musicManager.saveAllData();
        }
        getLogger().info("CustomJukeboxMusic has been disabled!");
    }
}