import { world } from "@minecraft/server";
export default class Audio_Manager {
    static music(audio) {
        if (audio.override)
            world.stopMusic();
        world.queueMusic(audio.id, audio.options);
    }
    static sound_Dimension(dimension_ID, location, audio) {
        world.getDimension(dimension_ID).playSound(audio.id, location, audio.options);
    }
    static sound(location, audio) {
        world.playSound(audio.id, location, audio.options);
    }
    static player_Music(player, audio) {
        if (audio.override)
            player.stopMusic();
        player.queueMusic(audio.id, audio.options);
    }
    static player_Sound(player, audio) {
        if (audio.override)
            this.player_Sound_Stop(player);
        player.playSound(audio.id, audio.options);
    }
    static player_Sound_Stop(player, audio_ID) {
        let command = "stopsound @s ";
        if (audio_ID != undefined)
            command = command + audio_ID;
        player.runCommandAsync(command);
    }
}
