Here is a reference chart for sound methods which you can use for various cases:
+
+
{| class="wikitable"
+
|+ Singleplayer and multiplayer sound functions
+
|-
+
! Singleplayer only name !! Multiplayer equivalent !! Use case
+
|-
+
| <tt>Game1.playSound</tt> || N/A || UI and menu sounds; playing a sound for one player only
+
|-
+
| <tt>GameLocation.localSound</tt> || <tt>GameLocation.playSound</tt> || For any in-game interactions on specific maps only
+
|-
+
| <tt>GameLocation.localSoundAt</tt> || <tt>GameLocation.playSoundAt</tt> || For playing spatial sounds in specific tiles or coordinates, which change volume and location based on player proximity
+
|-
+
| <tt>Game1.playSoundPitched</tt> || <tt>GameLocation.playSoundPitched</tt> || For playing any sounds at a different pitch than the original sound
+
|-
+
| <tt>DelayedAction.playSoundAfterDelay</tt> || N/A || For playing sounds after a specific period of time has passed