Class PlayableSound

java.lang.Object
me.hsgamer.hscore.bukkit.config.object.PlayableSound

public final class PlayableSound extends Object
a class that plays sounds to the given players.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlayableSound(@NotNull org.bukkit.Sound sound)
    ctor.
    PlayableSound(@NotNull org.bukkit.Sound sound, @NotNull Double volume)
    ctor.
    PlayableSound(@NotNull org.bukkit.Sound sound, @NotNull Double volume, @NotNull Double pitch)
    ctor.
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable PlayableSound
    deserialize(@NotNull Map<String,Object> serialized)
    serializes the values of the sound.
    void
    play(@NotNull Iterable<org.bukkit.entity.Player> players)
    plays the sound for the given player.
    void
    play(@NotNull org.bukkit.entity.Player... players)
    plays the sound for the given player.
    void
    play(@NotNull org.bukkit.Location location, @NotNull Iterable<org.bukkit.entity.Player> players)
    plays the sound for the given players on the given location.
    void
    play(@NotNull org.bukkit.Location location, @NotNull org.bukkit.entity.Player... players)
    plays the sound for the given players on the given location.
    @NotNull Map<String,Object>
    serializes the values of the sound.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlayableSound

      public PlayableSound(@NotNull @NotNull org.bukkit.Sound sound, @NotNull @NotNull Double volume, @NotNull @NotNull Double pitch)
      ctor.
      Parameters:
      sound - the sound to play.
      volume - the volume to play.
      pitch - the pitch to play.
    • PlayableSound

      public PlayableSound(@NotNull @NotNull org.bukkit.Sound sound, @NotNull @NotNull Double volume)
      ctor.
      Parameters:
      sound - the sound to play.
      volume - the volume to play.
    • PlayableSound

      public PlayableSound(@NotNull @NotNull org.bukkit.Sound sound)
      ctor.
      Parameters:
      sound - the sound to play.
  • Method Details

    • deserialize

      @Nullable public static @Nullable PlayableSound deserialize(@NotNull @NotNull Map<String,Object> serialized)
      serializes the values of the sound.
      Returns:
      a serialized map.
    • play

      public void play(@NotNull @NotNull org.bukkit.entity.Player... players)
      plays the sound for the given player.
      Parameters:
      players - the players to play.
    • play

      public void play(@NotNull @NotNull Iterable<org.bukkit.entity.Player> players)
      plays the sound for the given player.
      Parameters:
      players - the players to play.
    • play

      public void play(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.entity.Player... players)
      plays the sound for the given players on the given location.
      Parameters:
      players - the players to play.
      location - the location to play.
    • play

      public void play(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull Iterable<org.bukkit.entity.Player> players)
      plays the sound for the given players on the given location.
      Parameters:
      players - the players to play.
      location - the location to play.
    • serialize

      @NotNull public @NotNull Map<String,Object> serialize()
      serializes the values of the sound.
      Returns:
      a serialized map.