Add CustomSound.zip file from this project to resource_packs folder. Then open resource_packs.yml and type CustomSound.zip in resource_stack
use pocketmine\network\mcpe\protocol\PlaySoundPacket;
use pocketmine\Player;
$packet = new PlaySoundPacket();
$packet->soundName = "custom.sound.cave";
$packet->x = $sender->getX();
$packet->y = $sender->getY();
$packet->z = $sender->getZ();
$packet->volume = 1;
$packet->pitch = 1;
$sender->sendDataPacket($packet);
If you want more sounds added, you can contact me on Discord!
Discord: ByAlperenS#2447