Hi again, Sorry to be a bother again today but I was just wondering how to play a sound to the player. Any response is appreciated -Calrizer
A little something like this. PHP: $player->getLevel()->addSound(new LaunchSound($player), $player->getViewers());
So 'LaunchSound' is the name of the sound. Is there a list where I can see all the sounds? I had a look at the documentation and couldn't find anything.
Why is it $player->getViewers()? The second parameter should be the players to send the sound to. If you want to use the default (near players), pass null instead or simply skip that value.