CustomDiscs icon indicating copy to clipboard operation
CustomDiscs copied to clipboard

send a song to player

Open Diclo opened this issue 3 years ago • 3 comments

add feature to play song to specific player using a command, example: /customsong

Diclo avatar Nov 06 '22 17:11 Diclo

this seems like a nice feature for moderators to use :) although i dont know about playing it to a specific player i believe everyone else is going to be able to hear it

Navoei avatar Nov 06 '22 21:11 Navoei

I agree with this! To add to the idea, if it is possible, could you add "location" parameters? Say, you want a certain song to play in an area when a player clicks a button.

This button is linked to a command block which issues the /customdisc command. A hypothetical command would look like this:

/customdisc playsong <Song Title> [atTarget, atPlayer, atLocation] [<@a, @e, @p>, <PlayerName>, <X Y Z>] loop [true, false] [<integer amount to loop, -1 for unlimited>]

Examples:

To start playing a song originating from around a specific player: /customdisc playsong "CrabRave.mp3" atPlayer Navoei

To start playing a song at the nearest player [presumably from a command block]: /customdisc playsong "CrabRave.mp3" atTarget @p

To start playing a looped song forever at a specific location: /customdisc playsong "CrabRave.mp3" atLocation 100 64 110 loop true -1

TraipsingShadow avatar Jan 04 '23 13:01 TraipsingShadow

The target system seems like something that would not be very optimized. This is because the plugin will have to create a new audio channel for every single target. If you do @e that will probably crash the server. atPlayer and atLocation are possible to do. Still, stopping the sound after it has started playing will be an issue. The command will require coordinates (/stopdisc <X Y Z>). A player can move and therefore not be at the same location. I might experiment with different ways in which the voicechat plugin sends audio packets but for now i have no ETA on when this will be worked on.

Navoei avatar May 15 '23 05:05 Navoei