playSound

public static void playSound(Location location, String soundName, float volume, float pitch)

Plays either a registered Bukkit sound or a custom resource-pack sound. Legacy enum-style names are resolved first; custom keys are normalized to the lowercase namespaced format required by Minecraft resource locations.