Check out example codes for "spigot sounds". It will help you in understanding the concepts better.

Code Example 1

// volume 0.0-1.0 (more than 1 = players from far away can hear it)
// pitch = playback speed (1 is normal)
//player.playSound(location, sound, volume, pitch)
player.playSound(location, Sound.*****, 1.0F, 1.0F);	// Plays sound only for this player  
Bukkit.getWorld("world").playSound(location, sound, volume, pitch); // Plays sound for all players around sound source

Learn ReactJs, React Native from akashmittal.com