knoedellukas

I want a plugin where I can change the color of the sky with a command. Also, I want to be able to play music from a resource pack with a command. Add permissions too!

Kodari AI
KodariOct 31 at 8:42 pm 1
SkyTunes
A Minecraft plugin that allows players to dynamically change the sky color using a command, and play custom music tracks from a resource pack. Includes configurable permissions for both features, enabling server admins to control who can modify the sky or trigger music playback. The plugin provides intuitive commands with tab completion, visual feedback, and seamless integration with the game's ambient environment.
  1. Add a Paper plugin skeleton and register /skycolor and /music.

  2. Implement biome-based sky tint changes with reset, and resource-pack sound playback/stop.

  3. Declare command permissions and usage in plugin.yml.

Created the SkyMusic plugin with:

  • /skycolor <biome|reset> to apply a biome’s sky tint at your location and restore the original biome.

  • /music <sound-id|stop> [volume] [pitch] to play or stop resource-pack sounds.

  • Permissions skymusic.skycolor and skymusic.music (operators by default).

Vanilla server APIs provide biome-based sky tints, not arbitrary RGB sky colors. Changing a biome affects that spot in the shared world; the plugin restores tracked changes on reset or shutdown. The resource pack must be installed by players and define the sound IDs you play.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
5 218
src/main/java/com/kodari/skymusic/SkyMusicPlugin.java
package com.kodari.skymusic;

import java.util.Objects;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class SkyMusicPlugin extends JavaPlugin {
    private SkyColorCommand skyColorCommand;

    @Override
    public void onEnable() {
        skyColorCommand = new SkyColorCommand();
        PluginCommand skyCommand = Objects.requireNonNull(getCommand("skycolor"));
        skyCommand.setExecutor(skyColorCommand);
        Objects.requireNonNull(getCommand("music")).setExecutor(new MusicCommand());
    }

    @Override
    public void onDisable() {
        if (skyColorCommand != null) {
            skyColorCommand.restoreAll();
        }
    }
}