spigot sounds code example
Example: spigot sounds
// 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