Interface SoundManager


public interface SoundManager
Provides a platform-independent way to play sounds in BuildMC.

This interface abstracts away differences between server implementations (Paper vs Spigot) so that plugins and addons can play sounds without worrying about platform-specific APIs.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    playSound(@NotNull org.bukkit.Location location, @NotNull net.kyori.adventure.sound.Sound sound)
    Plays a sound at a specific location in the world.
    void
    playSound(@NotNull org.bukkit.entity.Player player, @NotNull net.kyori.adventure.sound.Sound sound)
    Plays a sound to a specific player.
  • Method Details

    • playSound

      void playSound(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull net.kyori.adventure.sound.Sound sound)
      Plays a sound to a specific player.

      Only the given player will hear the sound.

      Parameters:
      player - the player to hear the sound
      sound - the Sound to play
    • playSound

      void playSound(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull net.kyori.adventure.sound.Sound sound)
      Plays a sound at a specific location in the world.

      All players within audible range of the location will hear the sound.

      Parameters:
      location - the Location where the sound should be played
      sound - the Sound to play